language_server-protocol 3.16.0.3 → 3.17.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (356) 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/version.rb +1 -1
  351. metadata +92 -10
  352. data/lib/language_server/protocol/constant/initialize_error.rb +0 -16
  353. data/lib/language_server/protocol/interface/notification_message.rb +0 -48
  354. data/lib/language_server/protocol/interface/request_message.rb +0 -57
  355. data/lib/language_server/protocol/interface/response_error.rb +0 -52
  356. data/lib/language_server/protocol/interface/response_message.rb +0 -58
@@ -0,0 +1,75 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Parameters of the document diagnostic request.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class DocumentDiagnosticParams
10
+ def initialize(text_document:, identifier: nil, previous_result_id: nil, work_done_token: nil, partial_result_token: nil)
11
+ @attributes = {}
12
+
13
+ @attributes[:textDocument] = text_document
14
+ @attributes[:identifier] = identifier if identifier
15
+ @attributes[:previousResultId] = previous_result_id if previous_result_id
16
+ @attributes[:workDoneToken] = work_done_token if work_done_token
17
+ @attributes[:partialResultToken] = partial_result_token if partial_result_token
18
+
19
+ @attributes.freeze
20
+ end
21
+
22
+ #
23
+ # The text document.
24
+ #
25
+ # @return [TextDocumentIdentifier]
26
+ def text_document
27
+ attributes.fetch(:textDocument)
28
+ end
29
+
30
+ #
31
+ # The additional identifier provided during registration.
32
+ #
33
+ # @return [string | nil]
34
+ def identifier
35
+ attributes.fetch(:identifier)
36
+ end
37
+
38
+ #
39
+ # The result id of a previous response if provided.
40
+ #
41
+ # @return [string | nil]
42
+ def previous_result_id
43
+ attributes.fetch(:previousResultId)
44
+ end
45
+
46
+ #
47
+ # An optional token that a server can use to report work done progress.
48
+ #
49
+ # @return [ProgressToken | nil]
50
+ def work_done_token
51
+ attributes.fetch(:workDoneToken)
52
+ end
53
+
54
+ #
55
+ # An optional token that a server can use to report partial results (e.g. streaming) to
56
+ # the client.
57
+ #
58
+ # @return [ProgressToken | nil]
59
+ def partial_result_token
60
+ attributes.fetch(:partialResultToken)
61
+ end
62
+
63
+ attr_reader :attributes
64
+
65
+ def to_hash
66
+ attributes
67
+ end
68
+
69
+ def to_json(*args)
70
+ to_hash.to_json(*args)
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,77 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # The result of a document diagnostic pull request. A report can
6
+ # either be a full report containing all diagnostics for the
7
+ # requested document or an unchanged report indicating that nothing
8
+ # has changed in terms of diagnostics in comparison to the last
9
+ # pull request.
10
+ #
11
+ # @since 3.17.0
12
+ #
13
+ class DocumentDiagnosticReport
14
+ def initialize(related_documents: nil, kind:, result_id: nil, items:)
15
+ @attributes = {}
16
+
17
+ @attributes[:relatedDocuments] = related_documents if related_documents
18
+ @attributes[:kind] = kind
19
+ @attributes[:resultId] = result_id if result_id
20
+ @attributes[:items] = items
21
+
22
+ @attributes.freeze
23
+ end
24
+
25
+ #
26
+ # Diagnostics of related documents. This information is useful
27
+ # in programming languages where code in a file A can generate
28
+ # diagnostics in a file B which A depends on. An example of
29
+ # such a language is C/C++ where marco definitions in a file
30
+ # a.cpp and result in errors in a header file b.hpp.
31
+ #
32
+ # @since 3.17.0
33
+ #
34
+ # @return [DocumentUri => FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport | nil]
35
+ def related_documents
36
+ attributes.fetch(:relatedDocuments)
37
+ end
38
+
39
+ #
40
+ # A full document diagnostic report.
41
+ #
42
+ # @return ["full"]
43
+ def kind
44
+ attributes.fetch(:kind)
45
+ end
46
+
47
+ #
48
+ # An optional result id. If provided it will
49
+ # be sent on the next diagnostic request for the
50
+ # same document.
51
+ #
52
+ # @return [string | nil]
53
+ def result_id
54
+ attributes.fetch(:resultId)
55
+ end
56
+
57
+ #
58
+ # The actual items.
59
+ #
60
+ # @return [Diagnostic[]]
61
+ def items
62
+ attributes.fetch(:items)
63
+ end
64
+
65
+ attr_reader :attributes
66
+
67
+ def to_hash
68
+ attributes
69
+ end
70
+
71
+ def to_json(*args)
72
+ to_hash.to_json(*args)
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,35 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # A partial result for a document diagnostic report.
6
+ #
7
+ # @since 3.17.0
8
+ #
9
+ class DocumentDiagnosticReportPartialResult
10
+ def initialize(related_documents:)
11
+ @attributes = {}
12
+
13
+ @attributes[:relatedDocuments] = related_documents
14
+
15
+ @attributes.freeze
16
+ end
17
+
18
+ # @return [DocumentUri => FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport]
19
+ def related_documents
20
+ attributes.fetch(:relatedDocuments)
21
+ end
22
+
23
+ attr_reader :attributes
24
+
25
+ def to_hash
26
+ attributes
27
+ end
28
+
29
+ def to_json(*args)
30
+ to_hash.to_json(*args)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,19 +1,26 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # A document filter describes a top level text document or
6
+ # a notebook cell document.
7
+ #
8
+ # @since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.
9
+ #
4
10
  class DocumentFilter
5
- def initialize(language: nil, scheme: nil, pattern: nil)
11
+ def initialize(language:, scheme: nil, pattern: nil, notebook:)
6
12
  @attributes = {}
7
13
 
8
- @attributes[:language] = language if language
14
+ @attributes[:language] = language
9
15
  @attributes[:scheme] = scheme if scheme
10
16
  @attributes[:pattern] = pattern if pattern
17
+ @attributes[:notebook] = notebook
11
18
 
12
19
  @attributes.freeze
13
20
  end
14
21
 
15
22
  #
16
- # A language id, like `typescript`.
23
+ # A language id, like `typescript`. */
17
24
  #
18
25
  # @return [string]
19
26
  def language
@@ -21,33 +28,32 @@ module LanguageServer
21
28
  end
22
29
 
23
30
  #
24
- # A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
31
+ # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
25
32
  #
26
- # @return [string]
33
+ # @return [string | nil]
27
34
  def scheme
28
35
  attributes.fetch(:scheme)
29
36
  end
30
37
 
31
38
  #
32
- # A glob pattern, like `*.{ts,js}`.
33
- #
34
- # Glob patterns can have the following syntax:
35
- # - `*` to match one or more characters in a path segment
36
- # - `?` to match on one character in a path segment
37
- # - `**` to match any number of path segments, including none
38
- # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}`
39
- # matches all TypeScript and JavaScript files)
40
- # - `[]` to declare a range of characters to match in a path segment
41
- # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
42
- # - `[!...]` to negate a range of characters to match in a path segment
43
- # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but
44
- # not `example.0`)
39
+ # A glob pattern, like `*.{ts,js}`. */
45
40
  #
46
- # @return [string]
41
+ # @return [string | nil]
47
42
  def pattern
48
43
  attributes.fetch(:pattern)
49
44
  end
50
45
 
46
+ #
47
+ # A filter that matches against the notebook
48
+ # containing the notebook cell. If a string
49
+ # value is provided it matches against the
50
+ # notebook type. '*' matches every notebook.
51
+ #
52
+ # @return [string | NotebookDocumentFilter]
53
+ def notebook
54
+ attributes.fetch(:notebook)
55
+ end
56
+
51
57
  attr_reader :attributes
52
58
 
53
59
  def to_hash
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Client capabilities of a [DocumentFormattingRequest](#DocumentFormattingRequest).
6
+ #
4
7
  class DocumentFormattingClientCapabilities
5
8
  def initialize(dynamic_registration: nil)
6
9
  @attributes = {}
@@ -13,7 +16,7 @@ module LanguageServer
13
16
  #
14
17
  # Whether formatting supports dynamic registration.
15
18
  #
16
- # @return [boolean]
19
+ # @return [boolean | nil]
17
20
  def dynamic_registration
18
21
  attributes.fetch(:dynamicRegistration)
19
22
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Provider options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
6
+ #
4
7
  class DocumentFormattingOptions
5
8
  def initialize(work_done_progress: nil)
6
9
  @attributes = {}
@@ -10,7 +13,7 @@ module LanguageServer
10
13
  @attributes.freeze
11
14
  end
12
15
 
13
- # @return [boolean]
16
+ # @return [boolean | nil]
14
17
  def work_done_progress
15
18
  attributes.fetch(:workDoneProgress)
16
19
  end
@@ -1,25 +1,20 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # The parameters of a [DocumentFormattingRequest](#DocumentFormattingRequest).
6
+ #
4
7
  class DocumentFormattingParams
5
- def initialize(work_done_token: nil, text_document:, options:)
8
+ def initialize(text_document:, options:, work_done_token: nil)
6
9
  @attributes = {}
7
10
 
8
- @attributes[:workDoneToken] = work_done_token if work_done_token
9
11
  @attributes[:textDocument] = text_document
10
12
  @attributes[:options] = options
13
+ @attributes[:workDoneToken] = work_done_token if work_done_token
11
14
 
12
15
  @attributes.freeze
13
16
  end
14
17
 
15
- #
16
- # An optional token that a server can use to report work done progress.
17
- #
18
- # @return [ProgressToken]
19
- def work_done_token
20
- attributes.fetch(:workDoneToken)
21
- end
22
-
23
18
  #
24
19
  # The document to format.
25
20
  #
@@ -36,6 +31,14 @@ module LanguageServer
36
31
  attributes.fetch(:options)
37
32
  end
38
33
 
34
+ #
35
+ # An optional token that a server can use to report work done progress.
36
+ #
37
+ # @return [ProgressToken | nil]
38
+ def work_done_token
39
+ attributes.fetch(:workDoneToken)
40
+ end
41
+
39
42
  attr_reader :attributes
40
43
 
41
44
  def to_hash
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Registration options for a [DocumentFormattingRequest](#DocumentFormattingRequest).
6
+ #
4
7
  class DocumentFormattingRegistrationOptions
5
8
  def initialize(document_selector:, work_done_progress: nil)
6
9
  @attributes = {}
@@ -12,15 +15,15 @@ module LanguageServer
12
15
  end
13
16
 
14
17
  #
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.
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.
17
20
  #
18
- # @return [DocumentSelector]
21
+ # @return [DocumentSelector | null]
19
22
  def document_selector
20
23
  attributes.fetch(:documentSelector)
21
24
  end
22
25
 
23
- # @return [boolean]
26
+ # @return [boolean | nil]
24
27
  def work_done_progress
25
28
  attributes.fetch(:workDoneProgress)
26
29
  end
@@ -25,9 +25,9 @@ module LanguageServer
25
25
  end
26
26
 
27
27
  #
28
- # The highlight kind, default is DocumentHighlightKind.Text.
28
+ # The highlight kind, default is [text](#DocumentHighlightKind.Text).
29
29
  #
30
- # @return [DocumentHighlightKind]
30
+ # @return [DocumentHighlightKind | nil]
31
31
  def kind
32
32
  attributes.fetch(:kind)
33
33
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Client Capabilities for a [DocumentHighlightRequest](#DocumentHighlightRequest).
6
+ #
4
7
  class DocumentHighlightClientCapabilities
5
8
  def initialize(dynamic_registration: nil)
6
9
  @attributes = {}
@@ -13,7 +16,7 @@ module LanguageServer
13
16
  #
14
17
  # Whether document highlight supports dynamic registration.
15
18
  #
16
- # @return [boolean]
19
+ # @return [boolean | nil]
17
20
  def dynamic_registration
18
21
  attributes.fetch(:dynamicRegistration)
19
22
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Provider options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
6
+ #
4
7
  class DocumentHighlightOptions
5
8
  def initialize(work_done_progress: nil)
6
9
  @attributes = {}
@@ -10,7 +13,7 @@ module LanguageServer
10
13
  @attributes.freeze
11
14
  end
12
15
 
13
- # @return [boolean]
16
+ # @return [boolean | nil]
14
17
  def work_done_progress
15
18
  attributes.fetch(:workDoneProgress)
16
19
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Parameters for a [DocumentHighlightRequest](#DocumentHighlightRequest).
6
+ #
4
7
  class DocumentHighlightParams
5
8
  def initialize(text_document:, position:, work_done_token: nil, partial_result_token: nil)
6
9
  @attributes = {}
@@ -32,16 +35,16 @@ module LanguageServer
32
35
  #
33
36
  # An optional token that a server can use to report work done progress.
34
37
  #
35
- # @return [ProgressToken]
38
+ # @return [ProgressToken | nil]
36
39
  def work_done_token
37
40
  attributes.fetch(:workDoneToken)
38
41
  end
39
42
 
40
43
  #
41
- # An optional token that a server can use to report partial results (e.g.
42
- # streaming) to the client.
44
+ # An optional token that a server can use to report partial results (e.g. streaming) to
45
+ # the client.
43
46
  #
44
- # @return [ProgressToken]
47
+ # @return [ProgressToken | nil]
45
48
  def partial_result_token
46
49
  attributes.fetch(:partialResultToken)
47
50
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Registration options for a [DocumentHighlightRequest](#DocumentHighlightRequest).
6
+ #
4
7
  class DocumentHighlightRegistrationOptions
5
8
  def initialize(document_selector:, work_done_progress: nil)
6
9
  @attributes = {}
@@ -12,15 +15,15 @@ module LanguageServer
12
15
  end
13
16
 
14
17
  #
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.
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.
17
20
  #
18
- # @return [DocumentSelector]
21
+ # @return [DocumentSelector | null]
19
22
  def document_selector
20
23
  attributes.fetch(:documentSelector)
21
24
  end
22
25
 
23
- # @return [boolean]
26
+ # @return [boolean | nil]
24
27
  def work_done_progress
25
28
  attributes.fetch(:workDoneProgress)
26
29
  end
@@ -2,8 +2,8 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  #
5
- # A document link is a range in a text document that links to an internal or
6
- # external resource, like another text document or a web site.
5
+ # A document link is a range in a text document that links to an internal or external resource, like another
6
+ # text document or a web site.
7
7
  #
8
8
  class DocumentLink
9
9
  def initialize(range:, target: nil, tooltip: nil, data: nil)
@@ -28,7 +28,7 @@ module LanguageServer
28
28
  #
29
29
  # The uri this link points to. If missing a resolve request is sent later.
30
30
  #
31
- # @return [string]
31
+ # @return [string | nil]
32
32
  def target
33
33
  attributes.fetch(:target)
34
34
  end
@@ -36,12 +36,13 @@ module LanguageServer
36
36
  #
37
37
  # The tooltip text when you hover over this link.
38
38
  #
39
- # If a tooltip is provided, is will be displayed in a string that includes
40
- # instructions on how to trigger the link, such as `{0} (ctrl + click)`.
41
- # The specific instructions vary depending on OS, user settings, and
42
- # localization.
39
+ # If a tooltip is provided, is will be displayed in a string that includes instructions on how to
40
+ # trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
41
+ # user settings, and localization.
43
42
  #
44
- # @return [string]
43
+ # @since 3.15.0
44
+ #
45
+ # @return [string | nil]
45
46
  def tooltip
46
47
  attributes.fetch(:tooltip)
47
48
  end
@@ -50,7 +51,7 @@ module LanguageServer
50
51
  # A data entry field that is preserved on a document link between a
51
52
  # DocumentLinkRequest and a DocumentLinkResolveRequest.
52
53
  #
53
- # @return [any]
54
+ # @return [LSPAny | nil]
54
55
  def data
55
56
  attributes.fetch(:data)
56
57
  end
@@ -1,6 +1,9 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # The client capabilities of a [DocumentLinkRequest](#DocumentLinkRequest).
6
+ #
4
7
  class DocumentLinkClientCapabilities
5
8
  def initialize(dynamic_registration: nil, tooltip_support: nil)
6
9
  @attributes = {}
@@ -14,7 +17,7 @@ module LanguageServer
14
17
  #
15
18
  # Whether document link supports dynamic registration.
16
19
  #
17
- # @return [boolean]
20
+ # @return [boolean | nil]
18
21
  def dynamic_registration
19
22
  attributes.fetch(:dynamicRegistration)
20
23
  end
@@ -22,7 +25,9 @@ module LanguageServer
22
25
  #
23
26
  # Whether the client supports the `tooltip` property on `DocumentLink`.
24
27
  #
25
- # @return [boolean]
28
+ # @since 3.15.0
29
+ #
30
+ # @return [boolean | nil]
26
31
  def tooltip_support
27
32
  attributes.fetch(:tooltipSupport)
28
33
  end
@@ -1,29 +1,32 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # Provider options for a [DocumentLinkRequest](#DocumentLinkRequest).
6
+ #
4
7
  class DocumentLinkOptions
5
- def initialize(work_done_progress: nil, resolve_provider: nil)
8
+ def initialize(resolve_provider: nil, work_done_progress: nil)
6
9
  @attributes = {}
7
10
 
8
- @attributes[:workDoneProgress] = work_done_progress if work_done_progress
9
11
  @attributes[:resolveProvider] = resolve_provider if resolve_provider
12
+ @attributes[:workDoneProgress] = work_done_progress if work_done_progress
10
13
 
11
14
  @attributes.freeze
12
15
  end
13
16
 
14
- # @return [boolean]
15
- def work_done_progress
16
- attributes.fetch(:workDoneProgress)
17
- end
18
-
19
17
  #
20
18
  # Document links have a resolve provider as well.
21
19
  #
22
- # @return [boolean]
20
+ # @return [boolean | nil]
23
21
  def resolve_provider
24
22
  attributes.fetch(:resolveProvider)
25
23
  end
26
24
 
25
+ # @return [boolean | nil]
26
+ def work_done_progress
27
+ attributes.fetch(:workDoneProgress)
28
+ end
29
+
27
30
  attr_reader :attributes
28
31
 
29
32
  def to_hash
@@ -1,42 +1,45 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
+ #
5
+ # The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
6
+ #
4
7
  class DocumentLinkParams
5
- def initialize(work_done_token: nil, partial_result_token: nil, text_document:)
8
+ def initialize(text_document:, work_done_token: nil, partial_result_token: nil)
6
9
  @attributes = {}
7
10
 
11
+ @attributes[:textDocument] = text_document
8
12
  @attributes[:workDoneToken] = work_done_token if work_done_token
9
13
  @attributes[:partialResultToken] = partial_result_token if partial_result_token
10
- @attributes[:textDocument] = text_document
11
14
 
12
15
  @attributes.freeze
13
16
  end
14
17
 
18
+ #
19
+ # The document to provide document links for.
20
+ #
21
+ # @return [TextDocumentIdentifier]
22
+ def text_document
23
+ attributes.fetch(:textDocument)
24
+ end
25
+
15
26
  #
16
27
  # An optional token that a server can use to report work done progress.
17
28
  #
18
- # @return [ProgressToken]
29
+ # @return [ProgressToken | nil]
19
30
  def work_done_token
20
31
  attributes.fetch(:workDoneToken)
21
32
  end
22
33
 
23
34
  #
24
- # An optional token that a server can use to report partial results (e.g.
25
- # streaming) to the client.
35
+ # An optional token that a server can use to report partial results (e.g. streaming) to
36
+ # the client.
26
37
  #
27
- # @return [ProgressToken]
38
+ # @return [ProgressToken | nil]
28
39
  def partial_result_token
29
40
  attributes.fetch(:partialResultToken)
30
41
  end
31
42
 
32
- #
33
- # The document to provide document links for.
34
- #
35
- # @return [TextDocumentIdentifier]
36
- def text_document
37
- attributes.fetch(:textDocument)
38
- end
39
-
40
43
  attr_reader :attributes
41
44
 
42
45
  def to_hash