language_server-protocol 3.16.0.1 → 3.17.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +4 -4
  2. data/lib/language_server/protocol/constant/code_action_kind.rb +25 -24
  3. data/lib/language_server/protocol/constant/code_action_trigger_kind.rb +24 -0
  4. data/lib/language_server/protocol/constant/completion_item_tag.rb +4 -2
  5. data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -3
  6. data/lib/language_server/protocol/constant/diagnostic_severity.rb +3 -0
  7. data/lib/language_server/protocol/constant/diagnostic_tag.rb +4 -2
  8. data/lib/language_server/protocol/constant/error_codes.rb +19 -14
  9. data/lib/language_server/protocol/constant/failure_handling_kind.rb +9 -10
  10. data/lib/language_server/protocol/constant/file_change_type.rb +1 -1
  11. data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +4 -2
  12. data/lib/language_server/protocol/constant/folding_range_kind.rb +23 -0
  13. data/lib/language_server/protocol/constant/inlay_hint_kind.rb +21 -0
  14. data/lib/language_server/protocol/constant/insert_text_format.rb +2 -0
  15. data/lib/language_server/protocol/constant/insert_text_mode.rb +2 -0
  16. data/lib/language_server/protocol/constant/lsp_error_codes.rb +55 -0
  17. data/lib/language_server/protocol/constant/markup_kind.rb +2 -2
  18. data/lib/language_server/protocol/constant/message_type.rb +3 -0
  19. data/lib/language_server/protocol/constant/moniker_kind.rb +26 -0
  20. data/lib/language_server/protocol/constant/notebook_cell_kind.rb +21 -0
  21. data/lib/language_server/protocol/constant/position_encoding_kind.rb +32 -0
  22. data/lib/language_server/protocol/constant/resource_operation_kind.rb +3 -6
  23. data/lib/language_server/protocol/constant/semantic_token_modifiers.rb +25 -0
  24. data/lib/language_server/protocol/constant/semantic_token_types.rb +45 -0
  25. data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +3 -2
  26. data/lib/language_server/protocol/constant/symbol_tag.rb +2 -0
  27. data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
  28. data/lib/language_server/protocol/constant/text_document_sync_kind.rb +3 -3
  29. data/lib/language_server/protocol/constant/token_format.rb +1 -1
  30. data/lib/language_server/protocol/constant/trace_values.rb +20 -0
  31. data/lib/language_server/protocol/constant/uniqueness_level.rb +33 -0
  32. data/lib/language_server/protocol/constant.rb +22 -4
  33. data/lib/language_server/protocol/interface/annotated_text_edit.rb +12 -10
  34. data/lib/language_server/protocol/interface/apply_workspace_edit_params.rb +4 -1
  35. data/lib/language_server/protocol/interface/{apply_workspace_edit_response.rb → apply_workspace_edit_result.rb} +11 -7
  36. data/lib/language_server/protocol/interface/base_symbol_information.rb +68 -0
  37. data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +7 -5
  38. data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +5 -0
  39. data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +16 -11
  40. data/lib/language_server/protocol/interface/call_hierarchy_item.rb +14 -10
  41. data/lib/language_server/protocol/interface/call_hierarchy_options.rb +6 -1
  42. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +8 -2
  43. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +16 -11
  44. data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +6 -1
  45. data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +10 -5
  46. data/lib/language_server/protocol/interface/cancel_params.rb +1 -1
  47. data/lib/language_server/protocol/interface/change_annotation.rb +4 -2
  48. data/lib/language_server/protocol/interface/client_capabilities.rb +22 -6
  49. data/lib/language_server/protocol/interface/code_action.rb +28 -26
  50. data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +25 -9
  51. data/lib/language_server/protocol/interface/code_action_context.rb +20 -10
  52. data/lib/language_server/protocol/interface/code_action_options.rb +16 -11
  53. data/lib/language_server/protocol/interface/code_action_params.rb +21 -21
  54. data/lib/language_server/protocol/interface/code_action_registration_options.rb +19 -14
  55. data/lib/language_server/protocol/interface/code_description.rb +3 -1
  56. data/lib/language_server/protocol/interface/code_lens.rb +8 -9
  57. data/lib/language_server/protocol/interface/code_lens_client_capabilities.rb +4 -1
  58. data/lib/language_server/protocol/interface/code_lens_options.rb +11 -8
  59. data/lib/language_server/protocol/interface/code_lens_params.rb +17 -14
  60. data/lib/language_server/protocol/interface/code_lens_registration_options.rb +14 -11
  61. data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +4 -1
  62. data/lib/language_server/protocol/interface/color.rb +4 -4
  63. data/lib/language_server/protocol/interface/color_information.rb +3 -0
  64. data/lib/language_server/protocol/interface/color_presentation.rb +8 -9
  65. data/lib/language_server/protocol/interface/color_presentation_params.rb +24 -21
  66. data/lib/language_server/protocol/interface/command.rb +7 -1
  67. data/lib/language_server/protocol/interface/completion_client_capabilities.rb +33 -5
  68. data/lib/language_server/protocol/interface/completion_context.rb +4 -6
  69. data/lib/language_server/protocol/interface/completion_item.rb +92 -49
  70. data/lib/language_server/protocol/interface/completion_item_label_details.rb +49 -0
  71. data/lib/language_server/protocol/interface/completion_list.rb +28 -5
  72. data/lib/language_server/protocol/interface/completion_options.rb +36 -25
  73. data/lib/language_server/protocol/interface/completion_params.rb +18 -16
  74. data/lib/language_server/protocol/interface/completion_registration_options.rb +42 -28
  75. data/lib/language_server/protocol/interface/configuration_item.rb +2 -2
  76. data/lib/language_server/protocol/interface/configuration_params.rb +3 -0
  77. data/lib/language_server/protocol/interface/create_file.rb +7 -5
  78. data/lib/language_server/protocol/interface/create_file_options.rb +2 -2
  79. data/lib/language_server/protocol/interface/create_files_params.rb +4 -2
  80. data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +8 -5
  81. data/lib/language_server/protocol/interface/declaration_options.rb +1 -1
  82. data/lib/language_server/protocol/interface/declaration_params.rb +4 -4
  83. data/lib/language_server/protocol/interface/declaration_registration_options.rb +5 -5
  84. data/lib/language_server/protocol/interface/definition_client_capabilities.rb +7 -2
  85. data/lib/language_server/protocol/interface/definition_options.rb +4 -1
  86. data/lib/language_server/protocol/interface/definition_params.rb +7 -4
  87. data/lib/language_server/protocol/interface/definition_registration_options.rb +7 -4
  88. data/lib/language_server/protocol/interface/delete_file.rb +6 -4
  89. data/lib/language_server/protocol/interface/delete_file_options.rb +2 -2
  90. data/lib/language_server/protocol/interface/delete_files_params.rb +4 -2
  91. data/lib/language_server/protocol/interface/diagnostic.rb +25 -14
  92. data/lib/language_server/protocol/interface/diagnostic_client_capabilities.rb +49 -0
  93. data/lib/language_server/protocol/interface/diagnostic_options.rb +66 -0
  94. data/lib/language_server/protocol/interface/diagnostic_registration_options.rb +86 -0
  95. data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
  96. data/lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb +35 -0
  97. data/lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb +44 -0
  98. data/lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb +1 -1
  99. data/lib/language_server/protocol/interface/did_change_configuration_params.rb +4 -1
  100. data/lib/language_server/protocol/interface/did_change_configuration_registration_options.rb +30 -0
  101. data/lib/language_server/protocol/interface/did_change_notebook_document_params.rb +62 -0
  102. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +12 -11
  103. data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +17 -5
  104. data/lib/language_server/protocol/interface/did_change_watched_files_params.rb +3 -0
  105. data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb +1 -1
  106. data/lib/language_server/protocol/interface/did_change_workspace_folders_params.rb +3 -0
  107. data/lib/language_server/protocol/interface/did_close_notebook_document_params.rb +48 -0
  108. data/lib/language_server/protocol/interface/did_close_text_document_params.rb +3 -0
  109. data/lib/language_server/protocol/interface/did_open_notebook_document_params.rb +48 -0
  110. data/lib/language_server/protocol/interface/did_open_text_document_params.rb +3 -0
  111. data/lib/language_server/protocol/interface/did_save_notebook_document_params.rb +38 -0
  112. data/lib/language_server/protocol/interface/did_save_text_document_params.rb +4 -1
  113. data/lib/language_server/protocol/interface/document_color_client_capabilities.rb +4 -2
  114. data/lib/language_server/protocol/interface/document_color_options.rb +1 -1
  115. data/lib/language_server/protocol/interface/document_color_params.rb +17 -14
  116. data/lib/language_server/protocol/interface/document_color_registration_options.rb +11 -11
  117. data/lib/language_server/protocol/interface/document_diagnostic_params.rb +75 -0
  118. data/lib/language_server/protocol/interface/document_diagnostic_report.rb +77 -0
  119. data/lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb +35 -0
  120. data/lib/language_server/protocol/interface/document_filter.rb +25 -19
  121. data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +4 -1
  122. data/lib/language_server/protocol/interface/document_formatting_options.rb +4 -1
  123. data/lib/language_server/protocol/interface/document_formatting_params.rb +13 -10
  124. data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +7 -4
  125. data/lib/language_server/protocol/interface/document_highlight.rb +2 -2
  126. data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +4 -1
  127. data/lib/language_server/protocol/interface/document_highlight_options.rb +4 -1
  128. data/lib/language_server/protocol/interface/document_highlight_params.rb +7 -4
  129. data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +7 -4
  130. data/lib/language_server/protocol/interface/document_link.rb +10 -9
  131. data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +7 -2
  132. data/lib/language_server/protocol/interface/document_link_options.rb +11 -8
  133. data/lib/language_server/protocol/interface/document_link_params.rb +17 -14
  134. data/lib/language_server/protocol/interface/document_link_registration_options.rb +14 -11
  135. data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb +4 -1
  136. data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +5 -2
  137. data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +12 -4
  138. data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +8 -5
  139. data/lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb +5 -2
  140. data/lib/language_server/protocol/interface/document_range_formatting_options.rb +4 -1
  141. data/lib/language_server/protocol/interface/document_range_formatting_params.rb +13 -10
  142. data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +7 -4
  143. data/lib/language_server/protocol/interface/document_symbol.rb +18 -16
  144. data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +12 -5
  145. data/lib/language_server/protocol/interface/document_symbol_options.rb +13 -8
  146. data/lib/language_server/protocol/interface/document_symbol_params.rb +17 -14
  147. data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +16 -11
  148. data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +4 -1
  149. data/lib/language_server/protocol/interface/execute_command_options.rb +10 -7
  150. data/lib/language_server/protocol/interface/execute_command_params.rb +14 -11
  151. data/lib/language_server/protocol/interface/execute_command_registration_options.rb +8 -8
  152. data/lib/language_server/protocol/interface/execution_summary.rb +45 -0
  153. data/lib/language_server/protocol/interface/file_create.rb +2 -0
  154. data/lib/language_server/protocol/interface/file_delete.rb +2 -0
  155. data/lib/language_server/protocol/interface/file_event.rb +3 -3
  156. data/lib/language_server/protocol/interface/file_operation_client_capabilities.rb +95 -0
  157. data/lib/language_server/protocol/interface/file_operation_filter.rb +5 -3
  158. data/lib/language_server/protocol/interface/file_operation_options.rb +83 -0
  159. data/lib/language_server/protocol/interface/file_operation_pattern.rb +8 -10
  160. data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +3 -1
  161. data/lib/language_server/protocol/interface/file_operation_registration_options.rb +2 -0
  162. data/lib/language_server/protocol/interface/file_rename.rb +2 -0
  163. data/lib/language_server/protocol/interface/file_system_watcher.rb +4 -14
  164. data/lib/language_server/protocol/interface/folding_range.rb +30 -23
  165. data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +26 -4
  166. data/lib/language_server/protocol/interface/folding_range_options.rb +1 -1
  167. data/lib/language_server/protocol/interface/folding_range_params.rb +17 -14
  168. data/lib/language_server/protocol/interface/folding_range_registration_options.rb +5 -5
  169. data/lib/language_server/protocol/interface/formatting_options.rb +10 -4
  170. data/lib/language_server/protocol/interface/full_document_diagnostic_report.rb +58 -0
  171. data/lib/language_server/protocol/interface/general_client_capabilities.rb +91 -0
  172. data/lib/language_server/protocol/interface/glob_pattern.rb +48 -0
  173. data/lib/language_server/protocol/interface/hover.rb +3 -3
  174. data/lib/language_server/protocol/interface/hover_client_capabilities.rb +4 -5
  175. data/lib/language_server/protocol/interface/hover_options.rb +4 -1
  176. data/lib/language_server/protocol/interface/hover_params.rb +4 -1
  177. data/lib/language_server/protocol/interface/hover_registration_options.rb +7 -4
  178. data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +10 -5
  179. data/lib/language_server/protocol/interface/implementation_options.rb +1 -1
  180. data/lib/language_server/protocol/interface/implementation_params.rb +4 -4
  181. data/lib/language_server/protocol/interface/implementation_registration_options.rb +5 -5
  182. data/lib/language_server/protocol/interface/initialize_error.rb +2 -1
  183. data/lib/language_server/protocol/interface/initialize_params.rb +41 -29
  184. data/lib/language_server/protocol/interface/initialize_result.rb +6 -1
  185. data/lib/language_server/protocol/interface/inlay_hint.rb +118 -0
  186. data/lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb +48 -0
  187. data/lib/language_server/protocol/interface/inlay_hint_label_part.rb +81 -0
  188. data/lib/language_server/protocol/interface/inlay_hint_options.rb +45 -0
  189. data/lib/language_server/protocol/interface/inlay_hint_params.rb +56 -0
  190. data/lib/language_server/protocol/interface/inlay_hint_registration_options.rb +65 -0
  191. data/lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb +44 -0
  192. data/lib/language_server/protocol/interface/inline_value.rb +78 -0
  193. data/lib/language_server/protocol/interface/inline_value_client_capabilities.rb +38 -0
  194. data/lib/language_server/protocol/interface/inline_value_context.rb +46 -0
  195. data/lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb +50 -0
  196. data/lib/language_server/protocol/interface/inline_value_options.rb +35 -0
  197. data/lib/language_server/protocol/interface/inline_value_params.rb +66 -0
  198. data/lib/language_server/protocol/interface/inline_value_registration_options.rb +55 -0
  199. data/lib/language_server/protocol/interface/inline_value_text.rb +47 -0
  200. data/lib/language_server/protocol/interface/inline_value_variable_lookup.rb +59 -0
  201. data/lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb +44 -0
  202. data/lib/language_server/protocol/interface/insert_replace_edit.rb +2 -0
  203. data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +8 -4
  204. data/lib/language_server/protocol/interface/linked_editing_range_options.rb +1 -1
  205. data/lib/language_server/protocol/interface/linked_editing_range_params.rb +1 -1
  206. data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +5 -5
  207. data/lib/language_server/protocol/interface/linked_editing_ranges.rb +7 -2
  208. data/lib/language_server/protocol/interface/location.rb +5 -1
  209. data/lib/language_server/protocol/interface/location_link.rb +13 -11
  210. data/lib/language_server/protocol/interface/log_message_params.rb +4 -1
  211. data/lib/language_server/protocol/interface/log_trace_params.rb +1 -8
  212. data/lib/language_server/protocol/interface/{message.rb → lsp_object.rb} +6 -8
  213. data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +16 -2
  214. data/lib/language_server/protocol/interface/markup_content.rb +16 -18
  215. data/lib/language_server/protocol/interface/moniker.rb +3 -1
  216. data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +9 -5
  217. data/lib/language_server/protocol/interface/moniker_options.rb +1 -1
  218. data/lib/language_server/protocol/interface/moniker_params.rb +4 -4
  219. data/lib/language_server/protocol/interface/moniker_registration_options.rb +4 -4
  220. data/lib/language_server/protocol/interface/notebook_cell.rb +73 -0
  221. data/lib/language_server/protocol/interface/notebook_cell_array_change.rb +57 -0
  222. data/lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb +54 -0
  223. data/lib/language_server/protocol/interface/notebook_document.rb +78 -0
  224. data/lib/language_server/protocol/interface/notebook_document_change_event.rb +49 -0
  225. data/lib/language_server/protocol/interface/notebook_document_client_capabilities.rb +40 -0
  226. data/lib/language_server/protocol/interface/notebook_document_filter.rb +58 -0
  227. data/lib/language_server/protocol/interface/notebook_document_identifier.rb +38 -0
  228. data/lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb +50 -0
  229. data/lib/language_server/protocol/interface/notebook_document_sync_options.rb +58 -0
  230. data/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb +58 -0
  231. data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +17 -18
  232. data/lib/language_server/protocol/interface/parameter_information.rb +7 -9
  233. data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
  234. data/lib/language_server/protocol/interface/position.rb +40 -7
  235. data/lib/language_server/protocol/interface/prepare_rename_params.rb +10 -1
  236. data/lib/language_server/protocol/interface/prepare_rename_result.rb +60 -0
  237. data/lib/language_server/protocol/interface/previous_result_id.rb +48 -0
  238. data/lib/language_server/protocol/interface/progress_params.rb +1 -1
  239. data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +16 -5
  240. data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +8 -4
  241. data/lib/language_server/protocol/interface/range.rb +13 -0
  242. data/lib/language_server/protocol/interface/reference_client_capabilities.rb +4 -1
  243. data/lib/language_server/protocol/interface/reference_context.rb +4 -0
  244. data/lib/language_server/protocol/interface/reference_options.rb +4 -1
  245. data/lib/language_server/protocol/interface/reference_params.rb +14 -11
  246. data/lib/language_server/protocol/interface/reference_registration_options.rb +7 -4
  247. data/lib/language_server/protocol/interface/registration.rb +2 -2
  248. data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +3 -1
  249. data/lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb +73 -0
  250. data/lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb +66 -0
  251. data/lib/language_server/protocol/interface/relative_pattern.rb +50 -0
  252. data/lib/language_server/protocol/interface/rename_client_capabilities.rb +12 -7
  253. data/lib/language_server/protocol/interface/rename_file.rb +7 -5
  254. data/lib/language_server/protocol/interface/rename_file_options.rb +2 -2
  255. data/lib/language_server/protocol/interface/rename_files_params.rb +6 -4
  256. data/lib/language_server/protocol/interface/rename_options.rb +13 -8
  257. data/lib/language_server/protocol/interface/rename_params.rb +15 -12
  258. data/lib/language_server/protocol/interface/rename_registration_options.rb +16 -11
  259. data/lib/language_server/protocol/interface/resource_operation.rb +47 -0
  260. data/lib/language_server/protocol/interface/save_options.rb +4 -1
  261. data/lib/language_server/protocol/interface/selection_range.rb +6 -3
  262. data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -5
  263. data/lib/language_server/protocol/interface/selection_range_options.rb +1 -1
  264. data/lib/language_server/protocol/interface/selection_range_params.rb +23 -20
  265. data/lib/language_server/protocol/interface/selection_range_registration_options.rb +5 -5
  266. data/lib/language_server/protocol/interface/semantic_tokens.rb +5 -2
  267. data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +45 -11
  268. data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +5 -3
  269. data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +24 -21
  270. data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +3 -0
  271. data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +6 -3
  272. data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +3 -0
  273. data/lib/language_server/protocol/interface/semantic_tokens_options.rb +12 -9
  274. data/lib/language_server/protocol/interface/semantic_tokens_params.rb +17 -14
  275. data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +4 -1
  276. data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +23 -20
  277. data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +16 -13
  278. data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +5 -2
  279. data/lib/language_server/protocol/interface/server_capabilities.rb +139 -56
  280. data/lib/language_server/protocol/interface/set_trace_params.rb +1 -4
  281. data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +4 -2
  282. data/lib/language_server/protocol/interface/show_document_params.rb +6 -4
  283. data/lib/language_server/protocol/interface/show_document_result.rb +3 -1
  284. data/lib/language_server/protocol/interface/show_message_params.rb +4 -1
  285. data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +1 -1
  286. data/lib/language_server/protocol/interface/show_message_request_params.rb +2 -2
  287. data/lib/language_server/protocol/interface/signature_help.rb +3 -4
  288. data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +8 -3
  289. data/lib/language_server/protocol/interface/signature_help_context.rb +10 -11
  290. data/lib/language_server/protocol/interface/signature_help_options.rb +17 -14
  291. data/lib/language_server/protocol/interface/signature_help_params.rb +17 -13
  292. data/lib/language_server/protocol/interface/signature_help_registration_options.rb +20 -17
  293. data/lib/language_server/protocol/interface/signature_information.rb +5 -3
  294. data/lib/language_server/protocol/interface/static_registration_options.rb +3 -2
  295. data/lib/language_server/protocol/interface/symbol_information.rb +34 -30
  296. data/lib/language_server/protocol/interface/t.rb +24 -0
  297. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +12 -13
  298. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +108 -43
  299. data/lib/language_server/protocol/interface/text_document_content_change_event.rb +8 -10
  300. data/lib/language_server/protocol/interface/text_document_edit.rb +10 -1
  301. data/lib/language_server/protocol/interface/text_document_filter.rb +69 -0
  302. data/lib/language_server/protocol/interface/text_document_identifier.rb +5 -2
  303. data/lib/language_server/protocol/interface/text_document_item.rb +7 -3
  304. data/lib/language_server/protocol/interface/text_document_position_params.rb +4 -0
  305. data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
  306. data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +7 -4
  307. data/lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb +4 -4
  308. data/lib/language_server/protocol/interface/text_document_sync_options.rb +15 -17
  309. data/lib/language_server/protocol/interface/text_edit.rb +3 -0
  310. data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +10 -5
  311. data/lib/language_server/protocol/interface/type_definition_options.rb +1 -1
  312. data/lib/language_server/protocol/interface/type_definition_params.rb +4 -4
  313. data/lib/language_server/protocol/interface/type_definition_registration_options.rb +5 -5
  314. data/lib/language_server/protocol/interface/type_hierarchy_client_capabilities.rb +38 -0
  315. data/lib/language_server/protocol/interface/type_hierarchy_item.rb +105 -0
  316. data/lib/language_server/protocol/interface/type_hierarchy_options.rb +35 -0
  317. data/lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb +56 -0
  318. data/lib/language_server/protocol/interface/type_hierarchy_registration_options.rb +55 -0
  319. data/lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb +54 -0
  320. data/lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb +54 -0
  321. data/lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb +52 -0
  322. data/lib/language_server/protocol/interface/unregistration.rb +2 -2
  323. data/lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb +47 -0
  324. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +13 -13
  325. data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
  326. data/lib/language_server/protocol/interface/window_client_capabilities.rb +63 -0
  327. data/lib/language_server/protocol/interface/work_done_progress_begin.rb +6 -6
  328. data/lib/language_server/protocol/interface/work_done_progress_end.rb +1 -1
  329. data/lib/language_server/protocol/interface/work_done_progress_options.rb +1 -1
  330. data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
  331. data/lib/language_server/protocol/interface/work_done_progress_report.rb +6 -7
  332. data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +176 -0
  333. data/lib/language_server/protocol/interface/workspace_diagnostic_params.rb +67 -0
  334. data/lib/language_server/protocol/interface/workspace_diagnostic_report.rb +35 -0
  335. data/lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb +35 -0
  336. data/lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb +77 -0
  337. data/lib/language_server/protocol/interface/workspace_edit.rb +28 -17
  338. data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +15 -6
  339. data/lib/language_server/protocol/interface/workspace_folder.rb +4 -1
  340. data/lib/language_server/protocol/interface/workspace_folders_initialize_params.rb +39 -0
  341. data/lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb +3 -3
  342. data/lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb +77 -0
  343. data/lib/language_server/protocol/interface/workspace_symbol.rb +95 -0
  344. data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +23 -6
  345. data/lib/language_server/protocol/interface/workspace_symbol_options.rb +17 -2
  346. data/lib/language_server/protocol/interface/workspace_symbol_params.rb +16 -16
  347. data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +17 -2
  348. data/lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb +70 -0
  349. data/lib/language_server/protocol/interface.rb +156 -14
  350. data/lib/language_server/protocol/transport/io/reader.rb +8 -24
  351. data/lib/language_server/protocol/transport/io/writer.rb +1 -0
  352. data/lib/language_server/protocol/version.rb +1 -1
  353. metadata +92 -24
  354. data/lib/language_server/protocol/constant/initialize_error.rb +0 -16
  355. data/lib/language_server/protocol/interface/notification_message.rb +0 -48
  356. data/lib/language_server/protocol/interface/request_message.rb +0 -57
  357. data/lib/language_server/protocol/interface/response_error.rb +0 -52
  358. data/lib/language_server/protocol/interface/response_message.rb +0 -58
@@ -2,38 +2,31 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  class InitializeParams
5
- def initialize(work_done_token: nil, process_id:, client_info: nil, locale: nil, root_path: nil, root_uri:, initialization_options: nil, capabilities:, trace: nil, workspace_folders: nil)
5
+ def initialize(process_id:, client_info: nil, locale: nil, root_path: nil, root_uri:, capabilities:, initialization_options: nil, trace: nil, work_done_token: nil, workspace_folders: nil)
6
6
  @attributes = {}
7
7
 
8
- @attributes[:workDoneToken] = work_done_token if work_done_token
9
8
  @attributes[:processId] = process_id
10
9
  @attributes[:clientInfo] = client_info if client_info
11
10
  @attributes[:locale] = locale if locale
12
11
  @attributes[:rootPath] = root_path if root_path
13
12
  @attributes[:rootUri] = root_uri
14
- @attributes[:initializationOptions] = initialization_options if initialization_options
15
13
  @attributes[:capabilities] = capabilities
14
+ @attributes[:initializationOptions] = initialization_options if initialization_options
16
15
  @attributes[:trace] = trace if trace
16
+ @attributes[:workDoneToken] = work_done_token if work_done_token
17
17
  @attributes[:workspaceFolders] = workspace_folders if workspace_folders
18
18
 
19
19
  @attributes.freeze
20
20
  end
21
21
 
22
22
  #
23
- # An optional token that a server can use to report work done progress.
24
- #
25
- # @return [ProgressToken]
26
- def work_done_token
27
- attributes.fetch(:workDoneToken)
28
- end
29
-
23
+ # The process Id of the parent process that started
24
+ # the server.
30
25
  #
31
- # The process Id of the parent process that started the server. Is null if
32
- # the process has not been started by another process. If the parent
33
- # process is not alive then the server should exit (see exit notification)
34
- # its process.
26
+ # Is `null` if the process has not been started by another process.
27
+ # If the parent process is not alive then the server should exit.
35
28
  #
36
- # @return [number]
29
+ # @return [integer | null]
37
30
  def process_id
38
31
  attributes.fetch(:processId)
39
32
  end
@@ -41,7 +34,9 @@ module LanguageServer
41
34
  #
42
35
  # Information about the client
43
36
  #
44
- # @return [{ name: string; version?: string; }]
37
+ # @since 3.15.0
38
+ #
39
+ # @return [{ name:string, version:string } | nil]
45
40
  def client_info
46
41
  attributes.fetch(:clientInfo)
47
42
  end
@@ -54,7 +49,9 @@ module LanguageServer
54
49
  # Uses IETF language tags as the value's syntax
55
50
  # (See https://en.wikipedia.org/wiki/IETF_language_tag)
56
51
  #
57
- # @return [string]
52
+ # @since 3.16.0
53
+ #
54
+ # @return [string | nil]
58
55
  def locale
59
56
  attributes.fetch(:locale)
60
57
  end
@@ -63,7 +60,9 @@ module LanguageServer
63
60
  # The rootPath of the workspace. Is null
64
61
  # if no folder is open.
65
62
  #
66
- # @return [string]
63
+ # @deprecated in favour of rootUri.
64
+ #
65
+ # @return [string | null]
67
66
  def root_path
68
67
  attributes.fetch(:rootPath)
69
68
  end
@@ -73,19 +72,13 @@ module LanguageServer
73
72
  # folder is open. If both `rootPath` and `rootUri` are set
74
73
  # `rootUri` wins.
75
74
  #
76
- # @return [string]
75
+ # @deprecated in favour of workspaceFolders.
76
+ #
77
+ # @return [DocumentUri | null]
77
78
  def root_uri
78
79
  attributes.fetch(:rootUri)
79
80
  end
80
81
 
81
- #
82
- # User provided initialization options.
83
- #
84
- # @return [any]
85
- def initialization_options
86
- attributes.fetch(:initializationOptions)
87
- end
88
-
89
82
  #
90
83
  # The capabilities provided by the client (editor or tool)
91
84
  #
@@ -94,21 +87,40 @@ module LanguageServer
94
87
  attributes.fetch(:capabilities)
95
88
  end
96
89
 
90
+ #
91
+ # User provided initialization options.
92
+ #
93
+ # @return [LSPAny | nil]
94
+ def initialization_options
95
+ attributes.fetch(:initializationOptions)
96
+ end
97
+
97
98
  #
98
99
  # The initial trace setting. If omitted trace is disabled ('off').
99
100
  #
100
- # @return [TraceValue]
101
+ # @return ["off" | "messages" | "compact" | "verbose" | nil]
101
102
  def trace
102
103
  attributes.fetch(:trace)
103
104
  end
104
105
 
106
+ #
107
+ # An optional token that a server can use to report work done progress.
108
+ #
109
+ # @return [ProgressToken | nil]
110
+ def work_done_token
111
+ attributes.fetch(:workDoneToken)
112
+ end
113
+
105
114
  #
106
115
  # The workspace folders configured in the client when the server starts.
116
+ #
107
117
  # This property is only available if the client supports workspace folders.
108
118
  # It can be `null` if the client supports workspace folders but none are
109
119
  # configured.
110
120
  #
111
- # @return [WorkspaceFolder[]]
121
+ # @since 3.6.0
122
+ #
123
+ # @return [WorkspaceFolder[] | null]
112
124
  def workspace_folders
113
125
  attributes.fetch(:workspaceFolders)
114
126
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # The result returned from an initialize request.
6
+ #
4
7
  class InitializeResult
5
8
  def initialize(capabilities:, server_info: nil)
6
9
  @attributes = {}
@@ -22,7 +25,9 @@ module LanguageServer
22
25
  #
23
26
  # Information about the server.
24
27
  #
25
- # @return [{ name: string; version?: string; }]
28
+ # @since 3.15.0
29
+ #
30
+ # @return [{ name:string, version:string } | nil]
26
31
  def server_info
27
32
  attributes.fetch(:serverInfo)
28
33
  end
@@ -0,0 +1,118 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Inlay hint information.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class InlayHint
10
+ def initialize(position:, label:, kind: nil, text_edits: nil, tooltip: nil, padding_left: nil, padding_right: nil, data: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:position] = position
14
+ @attributes[:label] = label
15
+ @attributes[:kind] = kind if kind
16
+ @attributes[:textEdits] = text_edits if text_edits
17
+ @attributes[:tooltip] = tooltip if tooltip
18
+ @attributes[:paddingLeft] = padding_left if padding_left
19
+ @attributes[:paddingRight] = padding_right if padding_right
20
+ @attributes[:data] = data if data
21
+
22
+ @attributes.freeze
23
+ end
24
+
25
+ #
26
+ # The position of this hint.
27
+ #
28
+ # @return [Position]
29
+ def position
30
+ attributes.fetch(:position)
31
+ end
32
+
33
+ #
34
+ # The label of this hint. A human readable string or an array of
35
+ # InlayHintLabelPart label parts.
36
+ #
37
+ # *Note* that neither the string nor the label part can be empty.
38
+ #
39
+ # @return [string | InlayHintLabelPart[]]
40
+ def label
41
+ attributes.fetch(:label)
42
+ end
43
+
44
+ #
45
+ # The kind of this hint. Can be omitted in which case the client
46
+ # should fall back to a reasonable default.
47
+ #
48
+ # @return [InlayHintKind | nil]
49
+ def kind
50
+ attributes.fetch(:kind)
51
+ end
52
+
53
+ #
54
+ # Optional text edits that are performed when accepting this inlay hint.
55
+ #
56
+ # *Note* that edits are expected to change the document so that the inlay
57
+ # hint (or its nearest variant) is now part of the document and the inlay
58
+ # hint itself is now obsolete.
59
+ #
60
+ # @return [TextEdit[] | nil]
61
+ def text_edits
62
+ attributes.fetch(:textEdits)
63
+ end
64
+
65
+ #
66
+ # The tooltip text when you hover over this item.
67
+ #
68
+ # @return [string | MarkupContent | nil]
69
+ def tooltip
70
+ attributes.fetch(:tooltip)
71
+ end
72
+
73
+ #
74
+ # Render padding before the hint.
75
+ #
76
+ # Note: Padding should use the editor's background color, not the
77
+ # background color of the hint itself. That means padding can be used
78
+ # to visually align/separate an inlay hint.
79
+ #
80
+ # @return [boolean | nil]
81
+ def padding_left
82
+ attributes.fetch(:paddingLeft)
83
+ end
84
+
85
+ #
86
+ # Render padding after the hint.
87
+ #
88
+ # Note: Padding should use the editor's background color, not the
89
+ # background color of the hint itself. That means padding can be used
90
+ # to visually align/separate an inlay hint.
91
+ #
92
+ # @return [boolean | nil]
93
+ def padding_right
94
+ attributes.fetch(:paddingRight)
95
+ end
96
+
97
+ #
98
+ # A data entry field that is preserved on an inlay hint between
99
+ # a `textDocument/inlayHint` and a `inlayHint/resolve` request.
100
+ #
101
+ # @return [LSPAny | nil]
102
+ def data
103
+ attributes.fetch(:data)
104
+ end
105
+
106
+ attr_reader :attributes
107
+
108
+ def to_hash
109
+ attributes
110
+ end
111
+
112
+ def to_json(*args)
113
+ to_hash.to_json(*args)
114
+ end
115
+ end
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,48 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Inlay hint client capabilities.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class InlayHintClientCapabilities
10
+ def initialize(dynamic_registration: nil, resolve_support: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
14
+ @attributes[:resolveSupport] = resolve_support if resolve_support
15
+
16
+ @attributes.freeze
17
+ end
18
+
19
+ #
20
+ # Whether inlay hints support dynamic registration.
21
+ #
22
+ # @return [boolean | nil]
23
+ def dynamic_registration
24
+ attributes.fetch(:dynamicRegistration)
25
+ end
26
+
27
+ #
28
+ # Indicates which properties a client can resolve lazily on an inlay
29
+ # hint.
30
+ #
31
+ # @return [{ properties:string[] } | nil]
32
+ def resolve_support
33
+ attributes.fetch(:resolveSupport)
34
+ end
35
+
36
+ attr_reader :attributes
37
+
38
+ def to_hash
39
+ attributes
40
+ end
41
+
42
+ def to_json(*args)
43
+ to_hash.to_json(*args)
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,81 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # An inlay hint label part allows for interactive and composite labels
6
+ # of inlay hints.
7
+ #
8
+ # @since 3.17.0
9
+ #
10
+ class InlayHintLabelPart
11
+ def initialize(value:, tooltip: nil, location: nil, command: nil)
12
+ @attributes = {}
13
+
14
+ @attributes[:value] = value
15
+ @attributes[:tooltip] = tooltip if tooltip
16
+ @attributes[:location] = location if location
17
+ @attributes[:command] = command if command
18
+
19
+ @attributes.freeze
20
+ end
21
+
22
+ #
23
+ # The value of this label part.
24
+ #
25
+ # @return [string]
26
+ def value
27
+ attributes.fetch(:value)
28
+ end
29
+
30
+ #
31
+ # The tooltip text when you hover over this label part. Depending on
32
+ # the client capability `inlayHint.resolveSupport` clients might resolve
33
+ # this property late using the resolve request.
34
+ #
35
+ # @return [string | MarkupContent | nil]
36
+ def tooltip
37
+ attributes.fetch(:tooltip)
38
+ end
39
+
40
+ #
41
+ # An optional source code location that represents this
42
+ # label part.
43
+ #
44
+ # The editor will use this location for the hover and for code navigation
45
+ # features: This part will become a clickable link that resolves to the
46
+ # definition of the symbol at the given location (not necessarily the
47
+ # location itself), it shows the hover that shows at the given location,
48
+ # and it shows a context menu with further code navigation commands.
49
+ #
50
+ # Depending on the client capability `inlayHint.resolveSupport` clients
51
+ # might resolve this property late using the resolve request.
52
+ #
53
+ # @return [Location | nil]
54
+ def location
55
+ attributes.fetch(:location)
56
+ end
57
+
58
+ #
59
+ # An optional command for this label part.
60
+ #
61
+ # Depending on the client capability `inlayHint.resolveSupport` clients
62
+ # might resolve this property late using the resolve request.
63
+ #
64
+ # @return [Command | nil]
65
+ def command
66
+ attributes.fetch(:command)
67
+ end
68
+
69
+ attr_reader :attributes
70
+
71
+ def to_hash
72
+ attributes
73
+ end
74
+
75
+ def to_json(*args)
76
+ to_hash.to_json(*args)
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,45 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Inlay hint options used during static registration.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class InlayHintOptions
10
+ def initialize(resolve_provider: nil, work_done_progress: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:resolveProvider] = resolve_provider if resolve_provider
14
+ @attributes[:workDoneProgress] = work_done_progress if work_done_progress
15
+
16
+ @attributes.freeze
17
+ end
18
+
19
+ #
20
+ # The server provides support to resolve additional
21
+ # information for an inlay hint item.
22
+ #
23
+ # @return [boolean | nil]
24
+ def resolve_provider
25
+ attributes.fetch(:resolveProvider)
26
+ end
27
+
28
+ # @return [boolean | nil]
29
+ def work_done_progress
30
+ attributes.fetch(:workDoneProgress)
31
+ end
32
+
33
+ attr_reader :attributes
34
+
35
+ def to_hash
36
+ attributes
37
+ end
38
+
39
+ def to_json(*args)
40
+ to_hash.to_json(*args)
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,56 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # A parameter literal used in inlay hint requests.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class InlayHintParams
10
+ def initialize(text_document:, range:, work_done_token: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:textDocument] = text_document
14
+ @attributes[:range] = range
15
+ @attributes[:workDoneToken] = work_done_token if work_done_token
16
+
17
+ @attributes.freeze
18
+ end
19
+
20
+ #
21
+ # The text document.
22
+ #
23
+ # @return [TextDocumentIdentifier]
24
+ def text_document
25
+ attributes.fetch(:textDocument)
26
+ end
27
+
28
+ #
29
+ # The document range for which inlay hints should be computed.
30
+ #
31
+ # @return [Range]
32
+ def range
33
+ attributes.fetch(:range)
34
+ end
35
+
36
+ #
37
+ # An optional token that a server can use to report work done progress.
38
+ #
39
+ # @return [ProgressToken | nil]
40
+ def work_done_token
41
+ attributes.fetch(:workDoneToken)
42
+ end
43
+
44
+ attr_reader :attributes
45
+
46
+ def to_hash
47
+ attributes
48
+ end
49
+
50
+ def to_json(*args)
51
+ to_hash.to_json(*args)
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,65 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Inlay hint options used during static or dynamic registration.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class InlayHintRegistrationOptions
10
+ def initialize(resolve_provider: nil, work_done_progress: nil, document_selector:, id: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:resolveProvider] = resolve_provider if resolve_provider
14
+ @attributes[:workDoneProgress] = work_done_progress if work_done_progress
15
+ @attributes[:documentSelector] = document_selector
16
+ @attributes[:id] = id if id
17
+
18
+ @attributes.freeze
19
+ end
20
+
21
+ #
22
+ # The server provides support to resolve additional
23
+ # information for an inlay hint item.
24
+ #
25
+ # @return [boolean | nil]
26
+ def resolve_provider
27
+ attributes.fetch(:resolveProvider)
28
+ end
29
+
30
+ # @return [boolean | nil]
31
+ def work_done_progress
32
+ attributes.fetch(:workDoneProgress)
33
+ end
34
+
35
+ #
36
+ # A document selector to identify the scope of the registration. If set to null
37
+ # the document selector provided on the client side will be used.
38
+ #
39
+ # @return [DocumentSelector | null]
40
+ def document_selector
41
+ attributes.fetch(:documentSelector)
42
+ end
43
+
44
+ #
45
+ # The id used to register the request. The id can be used to deregister
46
+ # the request again. See also Registration#id.
47
+ #
48
+ # @return [string | nil]
49
+ def id
50
+ attributes.fetch(:id)
51
+ end
52
+
53
+ attr_reader :attributes
54
+
55
+ def to_hash
56
+ attributes
57
+ end
58
+
59
+ def to_json(*args)
60
+ to_hash.to_json(*args)
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,44 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Client workspace capabilities specific to inlay hints.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class InlayHintWorkspaceClientCapabilities
10
+ def initialize(refresh_support: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:refreshSupport] = refresh_support if refresh_support
14
+
15
+ @attributes.freeze
16
+ end
17
+
18
+ #
19
+ # Whether the client implementation supports a refresh request sent from
20
+ # the server to the client.
21
+ #
22
+ # Note that this event is global and will force the client to refresh all
23
+ # inlay hints currently shown. It should be used with absolute care and
24
+ # is useful for situation where a server for example detects a project wide
25
+ # change that requires such a calculation.
26
+ #
27
+ # @return [boolean | nil]
28
+ def refresh_support
29
+ attributes.fetch(:refreshSupport)
30
+ end
31
+
32
+ attr_reader :attributes
33
+
34
+ def to_hash
35
+ attributes
36
+ end
37
+
38
+ def to_json(*args)
39
+ to_hash.to_json(*args)
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,78 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Inline value information can be provided by different means:
6
+ # - directly as a text value (class InlineValueText).
7
+ # - as a name to use for a variable lookup (class InlineValueVariableLookup)
8
+ # - as an evaluatable expression (class InlineValueEvaluatableExpression)
9
+ # The InlineValue types combines all inline value types into one type.
10
+ #
11
+ # @since 3.17.0
12
+ #
13
+ class InlineValue
14
+ def initialize(range:, text:, variable_name: nil, case_sensitive_lookup:, expression: nil)
15
+ @attributes = {}
16
+
17
+ @attributes[:range] = range
18
+ @attributes[:text] = text
19
+ @attributes[:variableName] = variable_name if variable_name
20
+ @attributes[:caseSensitiveLookup] = case_sensitive_lookup
21
+ @attributes[:expression] = expression if expression
22
+
23
+ @attributes.freeze
24
+ end
25
+
26
+ #
27
+ # The document range for which the inline value applies.
28
+ #
29
+ # @return [Range]
30
+ def range
31
+ attributes.fetch(:range)
32
+ end
33
+
34
+ #
35
+ # The text of the inline value.
36
+ #
37
+ # @return [string]
38
+ def text
39
+ attributes.fetch(:text)
40
+ end
41
+
42
+ #
43
+ # If specified the name of the variable to look up.
44
+ #
45
+ # @return [string | nil]
46
+ def variable_name
47
+ attributes.fetch(:variableName)
48
+ end
49
+
50
+ #
51
+ # How to perform the lookup.
52
+ #
53
+ # @return [boolean]
54
+ def case_sensitive_lookup
55
+ attributes.fetch(:caseSensitiveLookup)
56
+ end
57
+
58
+ #
59
+ # If specified the expression overrides the extracted expression.
60
+ #
61
+ # @return [string | nil]
62
+ def expression
63
+ attributes.fetch(:expression)
64
+ end
65
+
66
+ attr_reader :attributes
67
+
68
+ def to_hash
69
+ attributes
70
+ end
71
+
72
+ def to_json(*args)
73
+ to_hash.to_json(*args)
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end