language_server-protocol 3.17.0.0 → 3.17.0.1

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 +29 -22
  3. data/lib/language_server/protocol/constant/code_action_trigger_kind.rb +0 -2
  4. data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -4
  5. data/lib/language_server/protocol/constant/completion_trigger_kind.rb +3 -2
  6. data/lib/language_server/protocol/constant/diagnostic_severity.rb +0 -3
  7. data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -4
  8. data/lib/language_server/protocol/constant/document_diagnostic_report_kind.rb +21 -0
  9. data/lib/language_server/protocol/constant/error_codes.rb +42 -16
  10. data/lib/language_server/protocol/constant/failure_handling_kind.rb +10 -9
  11. data/lib/language_server/protocol/constant/file_change_type.rb +1 -1
  12. data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +2 -4
  13. data/lib/language_server/protocol/constant/folding_range_kind.rb +5 -4
  14. data/lib/language_server/protocol/constant/initialize_error_codes.rb +16 -0
  15. data/lib/language_server/protocol/constant/inlay_hint_kind.rb +0 -2
  16. data/lib/language_server/protocol/constant/insert_text_format.rb +0 -2
  17. data/lib/language_server/protocol/constant/insert_text_mode.rb +0 -2
  18. data/lib/language_server/protocol/constant/markup_kind.rb +2 -2
  19. data/lib/language_server/protocol/constant/message_type.rb +0 -3
  20. data/lib/language_server/protocol/constant/moniker_kind.rb +3 -5
  21. data/lib/language_server/protocol/constant/notebook_cell_kind.rb +0 -2
  22. data/lib/language_server/protocol/constant/position_encoding_kind.rb +5 -5
  23. data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +1 -1
  24. data/lib/language_server/protocol/constant/resource_operation_kind.rb +6 -3
  25. data/lib/language_server/protocol/constant/semantic_token_modifiers.rb +10 -17
  26. data/lib/language_server/protocol/constant/semantic_token_types.rb +25 -35
  27. data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -3
  28. data/lib/language_server/protocol/constant/symbol_tag.rb +0 -2
  29. data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
  30. data/lib/language_server/protocol/constant/text_document_sync_kind.rb +3 -3
  31. data/lib/language_server/protocol/constant/token_format.rb +1 -1
  32. data/lib/language_server/protocol/constant/uniqueness_level.rb +5 -7
  33. data/lib/language_server/protocol/constant.rb +6 -4
  34. data/lib/language_server/protocol/interface/annotated_text_edit.rb +10 -12
  35. data/lib/language_server/protocol/interface/apply_workspace_edit_params.rb +1 -4
  36. data/lib/language_server/protocol/interface/apply_workspace_edit_result.rb +6 -10
  37. data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +5 -7
  38. data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +0 -5
  39. data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +11 -16
  40. data/lib/language_server/protocol/interface/call_hierarchy_item.rb +9 -13
  41. data/lib/language_server/protocol/interface/call_hierarchy_options.rb +1 -6
  42. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +2 -8
  43. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +11 -16
  44. data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +1 -6
  45. data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +5 -10
  46. data/lib/language_server/protocol/interface/cancel_params.rb +1 -1
  47. data/lib/language_server/protocol/interface/change_annotation.rb +2 -4
  48. data/lib/language_server/protocol/interface/client_capabilities.rb +6 -13
  49. data/lib/language_server/protocol/interface/code_action.rb +26 -28
  50. data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +9 -25
  51. data/lib/language_server/protocol/interface/code_action_context.rb +10 -11
  52. data/lib/language_server/protocol/interface/code_action_options.rb +11 -16
  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 +14 -19
  55. data/lib/language_server/protocol/interface/code_description.rb +1 -3
  56. data/lib/language_server/protocol/interface/code_lens.rb +9 -8
  57. data/lib/language_server/protocol/interface/code_lens_client_capabilities.rb +1 -4
  58. data/lib/language_server/protocol/interface/code_lens_options.rb +8 -11
  59. data/lib/language_server/protocol/interface/code_lens_params.rb +14 -17
  60. data/lib/language_server/protocol/interface/code_lens_registration_options.rb +11 -14
  61. data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +1 -4
  62. data/lib/language_server/protocol/interface/color.rb +4 -4
  63. data/lib/language_server/protocol/interface/color_information.rb +0 -3
  64. data/lib/language_server/protocol/interface/color_presentation.rb +9 -8
  65. data/lib/language_server/protocol/interface/color_presentation_params.rb +21 -24
  66. data/lib/language_server/protocol/interface/command.rb +1 -7
  67. data/lib/language_server/protocol/interface/completion_client_capabilities.rb +16 -24
  68. data/lib/language_server/protocol/interface/completion_context.rb +6 -4
  69. data/lib/language_server/protocol/interface/completion_item.rb +50 -61
  70. data/lib/language_server/protocol/interface/completion_item_label_details.rb +8 -8
  71. data/lib/language_server/protocol/interface/completion_list.rb +5 -6
  72. data/lib/language_server/protocol/interface/completion_options.rb +26 -27
  73. data/lib/language_server/protocol/interface/completion_params.rb +16 -18
  74. data/lib/language_server/protocol/interface/completion_registration_options.rb +29 -33
  75. data/lib/language_server/protocol/interface/configuration_item.rb +2 -2
  76. data/lib/language_server/protocol/interface/configuration_params.rb +0 -3
  77. data/lib/language_server/protocol/interface/create_file.rb +4 -6
  78. data/lib/language_server/protocol/interface/create_file_options.rb +2 -2
  79. data/lib/language_server/protocol/interface/create_files_params.rb +2 -4
  80. data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +5 -8
  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 +2 -7
  85. data/lib/language_server/protocol/interface/definition_options.rb +1 -4
  86. data/lib/language_server/protocol/interface/definition_params.rb +4 -7
  87. data/lib/language_server/protocol/interface/definition_registration_options.rb +4 -7
  88. data/lib/language_server/protocol/interface/delete_file.rb +3 -5
  89. data/lib/language_server/protocol/interface/delete_file_options.rb +2 -2
  90. data/lib/language_server/protocol/interface/delete_files_params.rb +2 -4
  91. data/lib/language_server/protocol/interface/diagnostic.rb +14 -25
  92. data/lib/language_server/protocol/interface/diagnostic_client_capabilities.rb +7 -7
  93. data/lib/language_server/protocol/interface/diagnostic_options.rb +8 -10
  94. data/lib/language_server/protocol/interface/diagnostic_registration_options.rb +12 -14
  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 +0 -2
  97. data/lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb +4 -6
  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 +0 -3
  100. data/lib/language_server/protocol/interface/did_change_notebook_document_params.rb +8 -14
  101. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -12
  102. data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +6 -8
  103. data/lib/language_server/protocol/interface/did_change_watched_files_params.rb +0 -3
  104. data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb +1 -1
  105. data/lib/language_server/protocol/interface/did_change_workspace_folders_params.rb +0 -3
  106. data/lib/language_server/protocol/interface/did_close_notebook_document_params.rb +0 -2
  107. data/lib/language_server/protocol/interface/did_close_text_document_params.rb +0 -3
  108. data/lib/language_server/protocol/interface/did_open_notebook_document_params.rb +0 -2
  109. data/lib/language_server/protocol/interface/did_open_text_document_params.rb +0 -3
  110. data/lib/language_server/protocol/interface/did_save_notebook_document_params.rb +0 -2
  111. data/lib/language_server/protocol/interface/did_save_text_document_params.rb +1 -4
  112. data/lib/language_server/protocol/interface/document_color_client_capabilities.rb +2 -4
  113. data/lib/language_server/protocol/interface/document_color_options.rb +1 -1
  114. data/lib/language_server/protocol/interface/document_color_params.rb +14 -17
  115. data/lib/language_server/protocol/interface/document_color_registration_options.rb +11 -11
  116. data/lib/language_server/protocol/interface/document_diagnostic_params.rb +22 -24
  117. data/lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb +1 -3
  118. data/lib/language_server/protocol/interface/document_filter.rb +19 -25
  119. data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +1 -4
  120. data/lib/language_server/protocol/interface/document_formatting_options.rb +1 -4
  121. data/lib/language_server/protocol/interface/document_formatting_params.rb +10 -13
  122. data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +4 -7
  123. data/lib/language_server/protocol/interface/document_highlight.rb +2 -2
  124. data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +1 -4
  125. data/lib/language_server/protocol/interface/document_highlight_options.rb +1 -4
  126. data/lib/language_server/protocol/interface/document_highlight_params.rb +4 -7
  127. data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +4 -7
  128. data/lib/language_server/protocol/interface/document_link.rb +9 -10
  129. data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +2 -7
  130. data/lib/language_server/protocol/interface/document_link_options.rb +8 -11
  131. data/lib/language_server/protocol/interface/document_link_params.rb +14 -17
  132. data/lib/language_server/protocol/interface/document_link_registration_options.rb +11 -14
  133. data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb +1 -4
  134. data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +1 -4
  135. data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +0 -3
  136. data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +4 -7
  137. data/lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb +2 -5
  138. data/lib/language_server/protocol/interface/document_range_formatting_options.rb +1 -4
  139. data/lib/language_server/protocol/interface/document_range_formatting_params.rb +10 -13
  140. data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +4 -7
  141. data/lib/language_server/protocol/interface/document_symbol.rb +15 -17
  142. data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +5 -12
  143. data/lib/language_server/protocol/interface/document_symbol_options.rb +8 -13
  144. data/lib/language_server/protocol/interface/document_symbol_params.rb +14 -17
  145. data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +11 -16
  146. data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +1 -4
  147. data/lib/language_server/protocol/interface/execute_command_options.rb +7 -10
  148. data/lib/language_server/protocol/interface/execute_command_params.rb +11 -14
  149. data/lib/language_server/protocol/interface/execute_command_registration_options.rb +8 -8
  150. data/lib/language_server/protocol/interface/execution_summary.rb +2 -2
  151. data/lib/language_server/protocol/interface/file_create.rb +0 -2
  152. data/lib/language_server/protocol/interface/file_delete.rb +0 -2
  153. data/lib/language_server/protocol/interface/file_event.rb +3 -3
  154. data/lib/language_server/protocol/interface/file_operation_filter.rb +3 -5
  155. data/lib/language_server/protocol/interface/file_operation_pattern.rb +10 -8
  156. data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +1 -3
  157. data/lib/language_server/protocol/interface/file_operation_registration_options.rb +0 -2
  158. data/lib/language_server/protocol/interface/file_rename.rb +0 -2
  159. data/lib/language_server/protocol/interface/file_system_watcher.rb +3 -4
  160. data/lib/language_server/protocol/interface/folding_range.rb +23 -19
  161. data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +5 -9
  162. data/lib/language_server/protocol/interface/folding_range_options.rb +1 -1
  163. data/lib/language_server/protocol/interface/folding_range_params.rb +14 -17
  164. data/lib/language_server/protocol/interface/folding_range_registration_options.rb +5 -5
  165. data/lib/language_server/protocol/interface/formatting_options.rb +4 -10
  166. data/lib/language_server/protocol/interface/full_document_diagnostic_report.rb +2 -4
  167. data/lib/language_server/protocol/interface/hover.rb +3 -3
  168. data/lib/language_server/protocol/interface/hover_client_capabilities.rb +5 -4
  169. data/lib/language_server/protocol/interface/hover_options.rb +1 -4
  170. data/lib/language_server/protocol/interface/hover_params.rb +1 -4
  171. data/lib/language_server/protocol/interface/hover_registration_options.rb +4 -7
  172. data/lib/language_server/protocol/interface/{t.rb → hover_result.rb} +8 -2
  173. data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +5 -10
  174. data/lib/language_server/protocol/interface/implementation_options.rb +1 -1
  175. data/lib/language_server/protocol/interface/implementation_params.rb +4 -4
  176. data/lib/language_server/protocol/interface/implementation_registration_options.rb +5 -5
  177. data/lib/language_server/protocol/interface/initialize_error.rb +0 -4
  178. data/lib/language_server/protocol/interface/initialize_params.rb +29 -41
  179. data/lib/language_server/protocol/interface/initialize_result.rb +1 -6
  180. data/lib/language_server/protocol/interface/inlay_hint.rb +13 -9
  181. data/lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb +3 -5
  182. data/lib/language_server/protocol/interface/inlay_hint_label_part.rb +3 -5
  183. data/lib/language_server/protocol/interface/inlay_hint_options.rb +8 -10
  184. data/lib/language_server/protocol/interface/inlay_hint_params.rb +11 -13
  185. data/lib/language_server/protocol/interface/inlay_hint_registration_options.rb +12 -14
  186. data/lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb +1 -3
  187. data/lib/language_server/protocol/interface/inline_value_client_capabilities.rb +3 -4
  188. data/lib/language_server/protocol/interface/inline_value_context.rb +3 -5
  189. data/lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb +7 -5
  190. data/lib/language_server/protocol/interface/inline_value_options.rb +1 -3
  191. data/lib/language_server/protocol/interface/inline_value_params.rb +10 -12
  192. data/lib/language_server/protocol/interface/inline_value_registration_options.rb +5 -7
  193. data/lib/language_server/protocol/interface/inline_value_text.rb +0 -2
  194. data/lib/language_server/protocol/interface/inline_value_variable_lookup.rb +7 -5
  195. data/lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb +5 -7
  196. data/lib/language_server/protocol/interface/insert_replace_edit.rb +0 -2
  197. data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +4 -8
  198. data/lib/language_server/protocol/interface/linked_editing_range_options.rb +1 -1
  199. data/lib/language_server/protocol/interface/linked_editing_range_params.rb +1 -1
  200. data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +5 -5
  201. data/lib/language_server/protocol/interface/linked_editing_ranges.rb +7 -11
  202. data/lib/language_server/protocol/interface/location.rb +1 -5
  203. data/lib/language_server/protocol/interface/location_link.rb +11 -13
  204. data/lib/language_server/protocol/interface/log_message_params.rb +1 -4
  205. data/lib/language_server/protocol/interface/log_trace_params.rb +8 -1
  206. data/lib/language_server/protocol/interface/markup_content.rb +18 -16
  207. data/lib/language_server/protocol/interface/{lsp_object.rb → message.rb} +8 -6
  208. data/lib/language_server/protocol/interface/moniker.rb +1 -3
  209. data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +5 -9
  210. data/lib/language_server/protocol/interface/moniker_options.rb +1 -1
  211. data/lib/language_server/protocol/interface/moniker_params.rb +4 -4
  212. data/lib/language_server/protocol/interface/moniker_registration_options.rb +4 -4
  213. data/lib/language_server/protocol/interface/notebook_cell.rb +4 -8
  214. data/lib/language_server/protocol/interface/notebook_cell_array_change.rb +4 -6
  215. data/lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb +1 -3
  216. data/lib/language_server/protocol/interface/notebook_document.rb +4 -8
  217. data/lib/language_server/protocol/interface/notebook_document_change_event.rb +2 -6
  218. data/lib/language_server/protocol/interface/notebook_document_client_capabilities.rb +0 -4
  219. data/lib/language_server/protocol/interface/notebook_document_filter.rb +32 -11
  220. data/lib/language_server/protocol/interface/notebook_document_identifier.rb +2 -4
  221. data/lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb +2 -4
  222. data/lib/language_server/protocol/interface/notebook_document_sync_options.rb +3 -5
  223. data/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb +3 -5
  224. data/lib/language_server/protocol/interface/notification_message.rb +48 -0
  225. data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +18 -17
  226. data/lib/language_server/protocol/interface/parameter_information.rb +9 -7
  227. data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
  228. data/lib/language_server/protocol/interface/position.rb +6 -40
  229. data/lib/language_server/protocol/interface/prepare_rename_params.rb +1 -1
  230. data/lib/language_server/protocol/interface/previous_result_id.rb +1 -3
  231. data/lib/language_server/protocol/interface/progress_params.rb +1 -1
  232. data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +5 -16
  233. data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +4 -8
  234. data/lib/language_server/protocol/interface/range.rb +0 -13
  235. data/lib/language_server/protocol/interface/reference_client_capabilities.rb +1 -4
  236. data/lib/language_server/protocol/interface/reference_context.rb +0 -4
  237. data/lib/language_server/protocol/interface/reference_options.rb +1 -4
  238. data/lib/language_server/protocol/interface/reference_params.rb +11 -14
  239. data/lib/language_server/protocol/interface/reference_registration_options.rb +4 -7
  240. data/lib/language_server/protocol/interface/registration.rb +2 -2
  241. data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +1 -3
  242. data/lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb +16 -20
  243. data/lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb +15 -19
  244. data/lib/language_server/protocol/interface/relative_pattern.rb +2 -4
  245. data/lib/language_server/protocol/interface/rename_client_capabilities.rb +7 -12
  246. data/lib/language_server/protocol/interface/rename_file.rb +4 -6
  247. data/lib/language_server/protocol/interface/rename_file_options.rb +2 -2
  248. data/lib/language_server/protocol/interface/rename_files_params.rb +4 -6
  249. data/lib/language_server/protocol/interface/rename_options.rb +8 -13
  250. data/lib/language_server/protocol/interface/rename_params.rb +12 -15
  251. data/lib/language_server/protocol/interface/rename_registration_options.rb +11 -16
  252. data/lib/language_server/protocol/interface/request_message.rb +57 -0
  253. data/lib/language_server/protocol/interface/response_error.rb +52 -0
  254. data/lib/language_server/protocol/interface/response_message.rb +58 -0
  255. data/lib/language_server/protocol/interface/save_options.rb +1 -4
  256. data/lib/language_server/protocol/interface/selection_range.rb +3 -6
  257. data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +5 -4
  258. data/lib/language_server/protocol/interface/selection_range_options.rb +1 -1
  259. data/lib/language_server/protocol/interface/selection_range_params.rb +20 -23
  260. data/lib/language_server/protocol/interface/selection_range_registration_options.rb +5 -5
  261. data/lib/language_server/protocol/interface/semantic_tokens.rb +2 -5
  262. data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +13 -19
  263. data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +3 -5
  264. data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +21 -24
  265. data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +0 -3
  266. data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +3 -6
  267. data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +0 -3
  268. data/lib/language_server/protocol/interface/semantic_tokens_options.rb +9 -12
  269. data/lib/language_server/protocol/interface/semantic_tokens_params.rb +14 -17
  270. data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +1 -4
  271. data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +20 -23
  272. data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +13 -16
  273. data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +2 -5
  274. data/lib/language_server/protocol/interface/server_capabilities.rb +66 -89
  275. data/lib/language_server/protocol/interface/set_trace_params.rb +4 -1
  276. data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +2 -4
  277. data/lib/language_server/protocol/interface/show_document_params.rb +4 -6
  278. data/lib/language_server/protocol/interface/show_document_result.rb +1 -3
  279. data/lib/language_server/protocol/interface/show_message_params.rb +1 -4
  280. data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +1 -1
  281. data/lib/language_server/protocol/interface/show_message_request_params.rb +2 -2
  282. data/lib/language_server/protocol/interface/signature_help.rb +6 -5
  283. data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +3 -8
  284. data/lib/language_server/protocol/interface/signature_help_context.rb +11 -10
  285. data/lib/language_server/protocol/interface/signature_help_options.rb +14 -17
  286. data/lib/language_server/protocol/interface/signature_help_params.rb +13 -17
  287. data/lib/language_server/protocol/interface/signature_help_registration_options.rb +17 -20
  288. data/lib/language_server/protocol/interface/signature_information.rb +3 -5
  289. data/lib/language_server/protocol/interface/static_registration_options.rb +2 -3
  290. data/lib/language_server/protocol/interface/symbol_information.rb +29 -33
  291. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +13 -12
  292. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +47 -76
  293. data/lib/language_server/protocol/interface/text_document_content_change_event.rb +8 -6
  294. data/lib/language_server/protocol/interface/text_document_edit.rb +1 -10
  295. data/lib/language_server/protocol/interface/text_document_identifier.rb +2 -5
  296. data/lib/language_server/protocol/interface/text_document_item.rb +3 -7
  297. data/lib/language_server/protocol/interface/text_document_position_params.rb +0 -4
  298. data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
  299. data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +4 -7
  300. data/lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb +4 -4
  301. data/lib/language_server/protocol/interface/text_document_sync_options.rb +19 -15
  302. data/lib/language_server/protocol/interface/text_edit.rb +0 -3
  303. data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +5 -10
  304. data/lib/language_server/protocol/interface/type_definition_options.rb +1 -1
  305. data/lib/language_server/protocol/interface/type_definition_params.rb +4 -4
  306. data/lib/language_server/protocol/interface/type_definition_registration_options.rb +5 -5
  307. data/lib/language_server/protocol/interface/type_hierarchy_item.rb +4 -7
  308. data/lib/language_server/protocol/interface/type_hierarchy_options.rb +1 -6
  309. data/lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb +1 -6
  310. data/lib/language_server/protocol/interface/type_hierarchy_registration_options.rb +5 -10
  311. data/lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb +11 -16
  312. data/lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb +11 -16
  313. data/lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb +1 -3
  314. data/lib/language_server/protocol/interface/unregistration.rb +2 -2
  315. data/lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb +3 -5
  316. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +13 -13
  317. data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
  318. data/lib/language_server/protocol/interface/work_done_progress_begin.rb +6 -6
  319. data/lib/language_server/protocol/interface/work_done_progress_end.rb +1 -1
  320. data/lib/language_server/protocol/interface/work_done_progress_options.rb +1 -1
  321. data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
  322. data/lib/language_server/protocol/interface/work_done_progress_report.rb +7 -6
  323. data/lib/language_server/protocol/interface/workspace_diagnostic_params.rb +21 -23
  324. data/lib/language_server/protocol/interface/workspace_diagnostic_report.rb +0 -2
  325. data/lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb +0 -2
  326. data/lib/language_server/protocol/interface/workspace_edit.rb +17 -28
  327. data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +6 -15
  328. data/lib/language_server/protocol/interface/workspace_folder.rb +1 -4
  329. data/lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb +3 -3
  330. data/lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb +22 -24
  331. data/lib/language_server/protocol/interface/workspace_symbol.rb +28 -34
  332. data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +7 -13
  333. data/lib/language_server/protocol/interface/workspace_symbol_options.rb +8 -13
  334. data/lib/language_server/protocol/interface/workspace_symbol_params.rb +16 -16
  335. data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +8 -13
  336. data/lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb +21 -23
  337. data/lib/language_server/protocol/interface.rb +16 -38
  338. data/lib/language_server/protocol/version.rb +1 -1
  339. metadata +10 -23
  340. data/lib/language_server/protocol/constant/lsp_error_codes.rb +0 -55
  341. data/lib/language_server/protocol/constant/trace_values.rb +0 -20
  342. data/lib/language_server/protocol/interface/base_symbol_information.rb +0 -68
  343. data/lib/language_server/protocol/interface/did_change_configuration_registration_options.rb +0 -30
  344. data/lib/language_server/protocol/interface/document_diagnostic_report.rb +0 -77
  345. data/lib/language_server/protocol/interface/file_operation_client_capabilities.rb +0 -95
  346. data/lib/language_server/protocol/interface/file_operation_options.rb +0 -83
  347. data/lib/language_server/protocol/interface/general_client_capabilities.rb +0 -91
  348. data/lib/language_server/protocol/interface/glob_pattern.rb +0 -48
  349. data/lib/language_server/protocol/interface/inline_value.rb +0 -78
  350. data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +0 -59
  351. data/lib/language_server/protocol/interface/prepare_rename_result.rb +0 -60
  352. data/lib/language_server/protocol/interface/resource_operation.rb +0 -47
  353. data/lib/language_server/protocol/interface/text_document_filter.rb +0 -69
  354. data/lib/language_server/protocol/interface/type_hierarchy_client_capabilities.rb +0 -38
  355. data/lib/language_server/protocol/interface/window_client_capabilities.rb +0 -63
  356. data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -176
  357. data/lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb +0 -77
  358. data/lib/language_server/protocol/interface/workspace_folders_initialize_params.rb +0 -39
@@ -5,7 +5,7 @@ module LanguageServer
5
5
  # Text document specific client capabilities.
6
6
  #
7
7
  class TextDocumentClientCapabilities
8
- def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, folding_range: nil, selection_range: nil, publish_diagnostics: nil, call_hierarchy: nil, semantic_tokens: nil, linked_editing_range: nil, moniker: nil, type_hierarchy: nil, inline_value: nil, inlay_hint: nil, diagnostic: nil)
8
+ def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, publish_diagnostics: nil, folding_range: nil, selection_range: nil, linked_editing_range: nil, call_hierarchy: nil, semantic_tokens: nil, moniker: nil, type_hierarchy: nil, inline_value: nil, inlay_hint: nil, diagnostic: nil)
9
9
  @attributes = {}
10
10
 
11
11
  @attributes[:synchronization] = synchronization if synchronization
@@ -27,12 +27,12 @@ module LanguageServer
27
27
  @attributes[:rangeFormatting] = range_formatting if range_formatting
28
28
  @attributes[:onTypeFormatting] = on_type_formatting if on_type_formatting
29
29
  @attributes[:rename] = rename if rename
30
+ @attributes[:publishDiagnostics] = publish_diagnostics if publish_diagnostics
30
31
  @attributes[:foldingRange] = folding_range if folding_range
31
32
  @attributes[:selectionRange] = selection_range if selection_range
32
- @attributes[:publishDiagnostics] = publish_diagnostics if publish_diagnostics
33
+ @attributes[:linkedEditingRange] = linked_editing_range if linked_editing_range
33
34
  @attributes[:callHierarchy] = call_hierarchy if call_hierarchy
34
35
  @attributes[:semanticTokens] = semantic_tokens if semantic_tokens
35
- @attributes[:linkedEditingRange] = linked_editing_range if linked_editing_range
36
36
  @attributes[:moniker] = moniker if moniker
37
37
  @attributes[:typeHierarchy] = type_hierarchy if type_hierarchy
38
38
  @attributes[:inlineValue] = inline_value if inline_value
@@ -42,10 +42,7 @@ module LanguageServer
42
42
  @attributes.freeze
43
43
  end
44
44
 
45
- #
46
- # Defines which synchronization capabilities the client supports.
47
- #
48
- # @return [TextDocumentSyncClientCapabilities | nil]
45
+ # @return [TextDocumentSyncClientCapabilities]
49
46
  def synchronization
50
47
  attributes.fetch(:synchronization)
51
48
  end
@@ -53,7 +50,7 @@ module LanguageServer
53
50
  #
54
51
  # Capabilities specific to the `textDocument/completion` request.
55
52
  #
56
- # @return [CompletionClientCapabilities | nil]
53
+ # @return [CompletionClientCapabilities]
57
54
  def completion
58
55
  attributes.fetch(:completion)
59
56
  end
@@ -61,7 +58,7 @@ module LanguageServer
61
58
  #
62
59
  # Capabilities specific to the `textDocument/hover` request.
63
60
  #
64
- # @return [HoverClientCapabilities | nil]
61
+ # @return [HoverClientCapabilities]
65
62
  def hover
66
63
  attributes.fetch(:hover)
67
64
  end
@@ -69,7 +66,7 @@ module LanguageServer
69
66
  #
70
67
  # Capabilities specific to the `textDocument/signatureHelp` request.
71
68
  #
72
- # @return [SignatureHelpClientCapabilities | nil]
69
+ # @return [SignatureHelpClientCapabilities]
73
70
  def signature_help
74
71
  attributes.fetch(:signatureHelp)
75
72
  end
@@ -77,9 +74,7 @@ module LanguageServer
77
74
  #
78
75
  # Capabilities specific to the `textDocument/declaration` request.
79
76
  #
80
- # @since 3.14.0
81
- #
82
- # @return [DeclarationClientCapabilities | nil]
77
+ # @return [DeclarationClientCapabilities]
83
78
  def declaration
84
79
  attributes.fetch(:declaration)
85
80
  end
@@ -87,7 +82,7 @@ module LanguageServer
87
82
  #
88
83
  # Capabilities specific to the `textDocument/definition` request.
89
84
  #
90
- # @return [DefinitionClientCapabilities | nil]
85
+ # @return [DefinitionClientCapabilities]
91
86
  def definition
92
87
  attributes.fetch(:definition)
93
88
  end
@@ -95,9 +90,7 @@ module LanguageServer
95
90
  #
96
91
  # Capabilities specific to the `textDocument/typeDefinition` request.
97
92
  #
98
- # @since 3.6.0
99
- #
100
- # @return [TypeDefinitionClientCapabilities | nil]
93
+ # @return [TypeDefinitionClientCapabilities]
101
94
  def type_definition
102
95
  attributes.fetch(:typeDefinition)
103
96
  end
@@ -105,9 +98,7 @@ module LanguageServer
105
98
  #
106
99
  # Capabilities specific to the `textDocument/implementation` request.
107
100
  #
108
- # @since 3.6.0
109
- #
110
- # @return [ImplementationClientCapabilities | nil]
101
+ # @return [ImplementationClientCapabilities]
111
102
  def implementation
112
103
  attributes.fetch(:implementation)
113
104
  end
@@ -115,7 +106,7 @@ module LanguageServer
115
106
  #
116
107
  # Capabilities specific to the `textDocument/references` request.
117
108
  #
118
- # @return [ReferenceClientCapabilities | nil]
109
+ # @return [ReferenceClientCapabilities]
119
110
  def references
120
111
  attributes.fetch(:references)
121
112
  end
@@ -123,7 +114,7 @@ module LanguageServer
123
114
  #
124
115
  # Capabilities specific to the `textDocument/documentHighlight` request.
125
116
  #
126
- # @return [DocumentHighlightClientCapabilities | nil]
117
+ # @return [DocumentHighlightClientCapabilities]
127
118
  def document_highlight
128
119
  attributes.fetch(:documentHighlight)
129
120
  end
@@ -131,7 +122,7 @@ module LanguageServer
131
122
  #
132
123
  # Capabilities specific to the `textDocument/documentSymbol` request.
133
124
  #
134
- # @return [DocumentSymbolClientCapabilities | nil]
125
+ # @return [DocumentSymbolClientCapabilities]
135
126
  def document_symbol
136
127
  attributes.fetch(:documentSymbol)
137
128
  end
@@ -139,7 +130,7 @@ module LanguageServer
139
130
  #
140
131
  # Capabilities specific to the `textDocument/codeAction` request.
141
132
  #
142
- # @return [CodeActionClientCapabilities | nil]
133
+ # @return [CodeActionClientCapabilities]
143
134
  def code_action
144
135
  attributes.fetch(:codeAction)
145
136
  end
@@ -147,7 +138,7 @@ module LanguageServer
147
138
  #
148
139
  # Capabilities specific to the `textDocument/codeLens` request.
149
140
  #
150
- # @return [CodeLensClientCapabilities | nil]
141
+ # @return [CodeLensClientCapabilities]
151
142
  def code_lens
152
143
  attributes.fetch(:codeLens)
153
144
  end
@@ -155,7 +146,7 @@ module LanguageServer
155
146
  #
156
147
  # Capabilities specific to the `textDocument/documentLink` request.
157
148
  #
158
- # @return [DocumentLinkClientCapabilities | nil]
149
+ # @return [DocumentLinkClientCapabilities]
159
150
  def document_link
160
151
  attributes.fetch(:documentLink)
161
152
  end
@@ -164,9 +155,7 @@ module LanguageServer
164
155
  # Capabilities specific to the `textDocument/documentColor` and the
165
156
  # `textDocument/colorPresentation` request.
166
157
  #
167
- # @since 3.6.0
168
- #
169
- # @return [DocumentColorClientCapabilities | nil]
158
+ # @return [DocumentColorClientCapabilities]
170
159
  def color_provider
171
160
  attributes.fetch(:colorProvider)
172
161
  end
@@ -174,7 +163,7 @@ module LanguageServer
174
163
  #
175
164
  # Capabilities specific to the `textDocument/formatting` request.
176
165
  #
177
- # @return [DocumentFormattingClientCapabilities | nil]
166
+ # @return [DocumentFormattingClientCapabilities]
178
167
  def formatting
179
168
  attributes.fetch(:formatting)
180
169
  end
@@ -182,15 +171,16 @@ module LanguageServer
182
171
  #
183
172
  # Capabilities specific to the `textDocument/rangeFormatting` request.
184
173
  #
185
- # @return [DocumentRangeFormattingClientCapabilities | nil]
174
+ # @return [DocumentRangeFormattingClientCapabilities]
186
175
  def range_formatting
187
176
  attributes.fetch(:rangeFormatting)
188
177
  end
189
178
 
190
179
  #
180
+ # request.
191
181
  # Capabilities specific to the `textDocument/onTypeFormatting` request.
192
182
  #
193
- # @return [DocumentOnTypeFormattingClientCapabilities | nil]
183
+ # @return [DocumentOnTypeFormattingClientCapabilities]
194
184
  def on_type_formatting
195
185
  attributes.fetch(:onTypeFormatting)
196
186
  end
@@ -198,17 +188,24 @@ module LanguageServer
198
188
  #
199
189
  # Capabilities specific to the `textDocument/rename` request.
200
190
  #
201
- # @return [RenameClientCapabilities | nil]
191
+ # @return [RenameClientCapabilities]
202
192
  def rename
203
193
  attributes.fetch(:rename)
204
194
  end
205
195
 
206
196
  #
207
- # Capabilities specific to the `textDocument/foldingRange` request.
197
+ # Capabilities specific to the `textDocument/publishDiagnostics`
198
+ # notification.
208
199
  #
209
- # @since 3.10.0
200
+ # @return [PublishDiagnosticsClientCapabilities]
201
+ def publish_diagnostics
202
+ attributes.fetch(:publishDiagnostics)
203
+ end
204
+
210
205
  #
211
- # @return [FoldingRangeClientCapabilities | nil]
206
+ # Capabilities specific to the `textDocument/foldingRange` request.
207
+ #
208
+ # @return [FoldingRangeClientCapabilities]
212
209
  def folding_range
213
210
  attributes.fetch(:foldingRange)
214
211
  end
@@ -216,57 +213,39 @@ module LanguageServer
216
213
  #
217
214
  # Capabilities specific to the `textDocument/selectionRange` request.
218
215
  #
219
- # @since 3.15.0
220
- #
221
- # @return [SelectionRangeClientCapabilities | nil]
216
+ # @return [SelectionRangeClientCapabilities]
222
217
  def selection_range
223
218
  attributes.fetch(:selectionRange)
224
219
  end
225
220
 
226
221
  #
227
- # Capabilities specific to the `textDocument/publishDiagnostics` notification.
222
+ # Capabilities specific to the `textDocument/linkedEditingRange` request.
228
223
  #
229
- # @return [PublishDiagnosticsClientCapabilities | nil]
230
- def publish_diagnostics
231
- attributes.fetch(:publishDiagnostics)
224
+ # @return [LinkedEditingRangeClientCapabilities]
225
+ def linked_editing_range
226
+ attributes.fetch(:linkedEditingRange)
232
227
  end
233
228
 
234
229
  #
235
230
  # Capabilities specific to the various call hierarchy requests.
236
231
  #
237
- # @since 3.16.0
238
- #
239
- # @return [CallHierarchyClientCapabilities | nil]
232
+ # @return [CallHierarchyClientCapabilities]
240
233
  def call_hierarchy
241
234
  attributes.fetch(:callHierarchy)
242
235
  end
243
236
 
244
237
  #
245
- # Capabilities specific to the various semantic token request.
238
+ # Capabilities specific to the various semantic token requests.
246
239
  #
247
- # @since 3.16.0
248
- #
249
- # @return [SemanticTokensClientCapabilities | nil]
240
+ # @return [SemanticTokensClientCapabilities]
250
241
  def semantic_tokens
251
242
  attributes.fetch(:semanticTokens)
252
243
  end
253
244
 
254
245
  #
255
- # Capabilities specific to the `textDocument/linkedEditingRange` request.
256
- #
257
- # @since 3.16.0
246
+ # Capabilities specific to the `textDocument/moniker` request.
258
247
  #
259
- # @return [LinkedEditingRangeClientCapabilities | nil]
260
- def linked_editing_range
261
- attributes.fetch(:linkedEditingRange)
262
- end
263
-
264
- #
265
- # Client capabilities specific to the `textDocument/moniker` request.
266
- #
267
- # @since 3.16.0
268
- #
269
- # @return [MonikerClientCapabilities | nil]
248
+ # @return [MonikerClientCapabilities]
270
249
  def moniker
271
250
  attributes.fetch(:moniker)
272
251
  end
@@ -274,9 +253,7 @@ module LanguageServer
274
253
  #
275
254
  # Capabilities specific to the various type hierarchy requests.
276
255
  #
277
- # @since 3.17.0
278
- #
279
- # @return [TypeHierarchyClientCapabilities | nil]
256
+ # @return [TypeHierarchyClientCapabilities]
280
257
  def type_hierarchy
281
258
  attributes.fetch(:typeHierarchy)
282
259
  end
@@ -284,9 +261,7 @@ module LanguageServer
284
261
  #
285
262
  # Capabilities specific to the `textDocument/inlineValue` request.
286
263
  #
287
- # @since 3.17.0
288
- #
289
- # @return [InlineValueClientCapabilities | nil]
264
+ # @return [InlineValueClientCapabilities]
290
265
  def inline_value
291
266
  attributes.fetch(:inlineValue)
292
267
  end
@@ -294,9 +269,7 @@ module LanguageServer
294
269
  #
295
270
  # Capabilities specific to the `textDocument/inlayHint` request.
296
271
  #
297
- # @since 3.17.0
298
- #
299
- # @return [InlayHintClientCapabilities | nil]
272
+ # @return [InlayHintClientCapabilities]
300
273
  def inlay_hint
301
274
  attributes.fetch(:inlayHint)
302
275
  end
@@ -304,9 +277,7 @@ module LanguageServer
304
277
  #
305
278
  # Capabilities specific to the diagnostic pull model.
306
279
  #
307
- # @since 3.17.0
308
- #
309
- # @return [DiagnosticClientCapabilities | nil]
280
+ # @return [DiagnosticClientCapabilities]
310
281
  def diagnostic
311
282
  attributes.fetch(:diagnostic)
312
283
  end
@@ -6,10 +6,10 @@ module LanguageServer
6
6
  # it is considered to be the full content of the document.
7
7
  #
8
8
  class TextDocumentContentChangeEvent
9
- def initialize(range:, range_length: nil, text:)
9
+ def initialize(range: nil, range_length: nil, text:)
10
10
  @attributes = {}
11
11
 
12
- @attributes[:range] = range
12
+ @attributes[:range] = range if range
13
13
  @attributes[:rangeLength] = range_length if range_length
14
14
  @attributes[:text] = text
15
15
 
@@ -19,7 +19,7 @@ module LanguageServer
19
19
  #
20
20
  # The range of the document that changed.
21
21
  #
22
- # @return [Range]
22
+ # @return [Range, nil]
23
23
  def range
24
24
  attributes.fetch(:range)
25
25
  end
@@ -27,9 +27,7 @@ module LanguageServer
27
27
  #
28
28
  # The optional length of the range that got replaced.
29
29
  #
30
- # @deprecated use range instead.
31
- #
32
- # @return [uinteger | nil]
30
+ # @return [number, nil]
33
31
  def range_length
34
32
  attributes.fetch(:rangeLength)
35
33
  end
@@ -37,6 +35,10 @@ module LanguageServer
37
35
  #
38
36
  # The new text for the provided range.
39
37
  #
38
+ # --- OR ---
39
+ #
40
+ # The new text of the whole document.
41
+ #
40
42
  # @return [string]
41
43
  def text
42
44
  attributes.fetch(:text)
@@ -1,12 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # Describes textual changes on a text document. A TextDocumentEdit describes all changes
6
- # on a document version Si and after they are applied move the document to version Si+1.
7
- # So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
8
- # kind of ordering. However the edits must be non overlapping.
9
- #
10
4
  class TextDocumentEdit
11
5
  def initialize(text_document:, edits:)
12
6
  @attributes = {}
@@ -28,10 +22,7 @@ module LanguageServer
28
22
  #
29
23
  # The edits to be applied.
30
24
  #
31
- # @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a
32
- # client capability.
33
- #
34
- # @return [TextEdit | AnnotatedTextEdit[]]
25
+ # @return [(TextEdit | AnnotatedTextEdit)[]]
35
26
  def edits
36
27
  attributes.fetch(:edits)
37
28
  end
@@ -1,9 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # A literal to identify a text document in the client.
6
- #
7
4
  class TextDocumentIdentifier
8
5
  def initialize(uri:)
9
6
  @attributes = {}
@@ -14,9 +11,9 @@ module LanguageServer
14
11
  end
15
12
 
16
13
  #
17
- # The text document's uri.
14
+ # The text document's URI.
18
15
  #
19
- # @return [DocumentUri]
16
+ # @return [string]
20
17
  def uri
21
18
  attributes.fetch(:uri)
22
19
  end
@@ -1,10 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # An item to transfer a text document from the client to the
6
- # server.
7
- #
8
4
  class TextDocumentItem
9
5
  def initialize(uri:, language_id:, version:, text:)
10
6
  @attributes = {}
@@ -18,9 +14,9 @@ module LanguageServer
18
14
  end
19
15
 
20
16
  #
21
- # The text document's uri.
17
+ # The text document's URI.
22
18
  #
23
- # @return [DocumentUri]
19
+ # @return [string]
24
20
  def uri
25
21
  attributes.fetch(:uri)
26
22
  end
@@ -37,7 +33,7 @@ module LanguageServer
37
33
  # The version number of this document (it will increase after each
38
34
  # change, including undo/redo).
39
35
  #
40
- # @return [integer]
36
+ # @return [number]
41
37
  def version
42
38
  attributes.fetch(:version)
43
39
  end
@@ -1,10 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # A parameter literal used in requests to pass a text document and a position inside that
6
- # document.
7
- #
8
4
  class TextDocumentPositionParams
9
5
  def initialize(text_document:, position:)
10
6
  @attributes = {}
@@ -14,10 +14,10 @@ module LanguageServer
14
14
  end
15
15
 
16
16
  #
17
- # A document selector to identify the scope of the registration. If set to null
18
- # the document selector provided on the client side will be used.
17
+ # A document selector to identify the scope of the registration. If set to
18
+ # null the document selector provided on the client side will be used.
19
19
  #
20
- # @return [DocumentSelector | null]
20
+ # @return [DocumentSelector]
21
21
  def document_selector
22
22
  attributes.fetch(:documentSelector)
23
23
  end
@@ -1,9 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # Save registration options.
6
- #
7
4
  class TextDocumentSaveRegistrationOptions
8
5
  def initialize(document_selector:, include_text: nil)
9
6
  @attributes = {}
@@ -15,10 +12,10 @@ module LanguageServer
15
12
  end
16
13
 
17
14
  #
18
- # A document selector to identify the scope of the registration. If set to null
19
- # the document selector provided on the client side will be used.
15
+ # A document selector to identify the scope of the registration. If set to
16
+ # null the document selector provided on the client side will be used.
20
17
  #
21
- # @return [DocumentSelector | null]
18
+ # @return [DocumentSelector]
22
19
  def document_selector
23
20
  attributes.fetch(:documentSelector)
24
21
  end
@@ -26,7 +23,7 @@ module LanguageServer
26
23
  #
27
24
  # The client is supposed to include the content on save.
28
25
  #
29
- # @return [boolean | nil]
26
+ # @return [boolean]
30
27
  def include_text
31
28
  attributes.fetch(:includeText)
32
29
  end
@@ -16,7 +16,7 @@ module LanguageServer
16
16
  #
17
17
  # Whether text document synchronization supports dynamic registration.
18
18
  #
19
- # @return [boolean | nil]
19
+ # @return [boolean]
20
20
  def dynamic_registration
21
21
  attributes.fetch(:dynamicRegistration)
22
22
  end
@@ -24,7 +24,7 @@ module LanguageServer
24
24
  #
25
25
  # The client supports sending will save notifications.
26
26
  #
27
- # @return [boolean | nil]
27
+ # @return [boolean]
28
28
  def will_save
29
29
  attributes.fetch(:willSave)
30
30
  end
@@ -34,7 +34,7 @@ module LanguageServer
34
34
  # waits for a response providing text edits which will
35
35
  # be applied to the document before it is saved.
36
36
  #
37
- # @return [boolean | nil]
37
+ # @return [boolean]
38
38
  def will_save_wait_until
39
39
  attributes.fetch(:willSaveWaitUntil)
40
40
  end
@@ -42,7 +42,7 @@ module LanguageServer
42
42
  #
43
43
  # The client supports did save notifications.
44
44
  #
45
- # @return [boolean | nil]
45
+ # @return [boolean]
46
46
  def did_save
47
47
  attributes.fetch(:didSave)
48
48
  end
@@ -15,46 +15,50 @@ module LanguageServer
15
15
  end
16
16
 
17
17
  #
18
- # Open and close notifications are sent to the server. If omitted open close notifications should not
19
- # be sent.
18
+ # Open and close notifications are sent to the server. If omitted open
19
+ # close notifications should not be sent.
20
+ # Open and close notifications are sent to the server. If omitted open
21
+ # close notification should not be sent.
20
22
  #
21
- # @return [boolean | nil]
23
+ # @return [boolean]
22
24
  def open_close
23
25
  attributes.fetch(:openClose)
24
26
  end
25
27
 
26
28
  #
27
- # Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
28
- # and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
29
+ # Change notifications are sent to the server. See
30
+ # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and
31
+ # TextDocumentSyncKind.Incremental. If omitted it defaults to
32
+ # TextDocumentSyncKind.None.
29
33
  #
30
- # @return [TextDocumentSyncKind | nil]
34
+ # @return [TextDocumentSyncKind]
31
35
  def change
32
36
  attributes.fetch(:change)
33
37
  end
34
38
 
35
39
  #
36
- # If present will save notifications are sent to the server. If omitted the notification should not be
37
- # sent.
40
+ # If present will save notifications are sent to the server. If omitted
41
+ # the notification should not be sent.
38
42
  #
39
- # @return [boolean | nil]
43
+ # @return [boolean]
40
44
  def will_save
41
45
  attributes.fetch(:willSave)
42
46
  end
43
47
 
44
48
  #
45
- # If present will save wait until requests are sent to the server. If omitted the request should not be
46
- # sent.
49
+ # If present will save wait until requests are sent to the server. If
50
+ # omitted the request should not be sent.
47
51
  #
48
- # @return [boolean | nil]
52
+ # @return [boolean]
49
53
  def will_save_wait_until
50
54
  attributes.fetch(:willSaveWaitUntil)
51
55
  end
52
56
 
53
57
  #
54
- # If present save notifications are sent to the server. If omitted the notification should not be
55
- # sent.
58
+ # If present save notifications are sent to the server. If omitted the
59
+ # notification should not be sent.
56
60
  #
57
- # @return [boolean | SaveOptions | nil]
61
+ # @return [boolean | SaveOptions]
58
62
  def save
59
63
  attributes.fetch(:save)
60
64
  end
@@ -1,9 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # A text edit applicable to a text document.
6
- #
7
4
  class TextEdit
8
5
  def initialize(range:, new_text:)
9
6
  @attributes = {}
@@ -1,9 +1,6 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- #
5
- # Since 3.6.0
6
- #
7
4
  class TypeDefinitionClientCapabilities
8
5
  def initialize(dynamic_registration: nil, link_support: nil)
9
6
  @attributes = {}
@@ -15,11 +12,11 @@ module LanguageServer
15
12
  end
16
13
 
17
14
  #
18
- # Whether implementation supports dynamic registration. If this is set to `true`
19
- # the client supports the new `TypeDefinitionRegistrationOptions` return value
20
- # for the corresponding server capability as well.
15
+ # Whether implementation supports dynamic registration. If this is set to
16
+ # `true` the client supports the new `TypeDefinitionRegistrationOptions`
17
+ # return value for the corresponding server capability as well.
21
18
  #
22
- # @return [boolean | nil]
19
+ # @return [boolean]
23
20
  def dynamic_registration
24
21
  attributes.fetch(:dynamicRegistration)
25
22
  end
@@ -27,9 +24,7 @@ module LanguageServer
27
24
  #
28
25
  # The client supports additional metadata in the form of definition links.
29
26
  #
30
- # Since 3.14.0
31
- #
32
- # @return [boolean | nil]
27
+ # @return [boolean]
33
28
  def link_support
34
29
  attributes.fetch(:linkSupport)
35
30
  end
@@ -10,7 +10,7 @@ module LanguageServer
10
10
  @attributes.freeze
11
11
  end
12
12
 
13
- # @return [boolean | nil]
13
+ # @return [boolean]
14
14
  def work_done_progress
15
15
  attributes.fetch(:workDoneProgress)
16
16
  end