language_server-protocol 3.15.0.2 → 3.16.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/language_server/protocol/constant/code_action_kind.rb +6 -4
  4. data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -2
  5. data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
  6. data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -2
  7. data/lib/language_server/protocol/constant/error_codes.rb +26 -3
  8. data/lib/language_server/protocol/constant/failure_handling_kind.rb +6 -5
  9. data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +20 -0
  10. data/lib/language_server/protocol/constant/initialize_error.rb +2 -1
  11. data/lib/language_server/protocol/constant/insert_text_mode.rb +30 -0
  12. data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +13 -0
  13. data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -1
  14. data/lib/language_server/protocol/constant/symbol_tag.rb +15 -0
  15. data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
  16. data/lib/language_server/protocol/constant/text_document_sync_kind.rb +2 -2
  17. data/lib/language_server/protocol/constant/token_format.rb +9 -0
  18. data/lib/language_server/protocol/constant.rb +10 -0
  19. data/lib/language_server/protocol/interface/annotated_text_edit.rb +56 -0
  20. data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +15 -4
  21. data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +36 -0
  22. data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +43 -0
  23. data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +49 -0
  24. data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
  25. data/lib/language_server/protocol/interface/call_hierarchy_options.rb +30 -0
  26. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +43 -0
  27. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +49 -0
  28. data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +51 -0
  29. data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +50 -0
  30. data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
  31. data/lib/language_server/protocol/interface/client_capabilities.rb +12 -3
  32. data/lib/language_server/protocol/interface/code_action.rb +43 -8
  33. data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +44 -1
  34. data/lib/language_server/protocol/interface/code_action_context.rb +7 -6
  35. data/lib/language_server/protocol/interface/code_action_options.rb +19 -4
  36. data/lib/language_server/protocol/interface/code_action_params.rb +20 -2
  37. data/lib/language_server/protocol/interface/code_action_registration_options.rb +38 -2
  38. data/lib/language_server/protocol/interface/code_description.rb +36 -0
  39. data/lib/language_server/protocol/interface/code_lens.rb +5 -3
  40. data/lib/language_server/protocol/interface/code_lens_options.rb +6 -1
  41. data/lib/language_server/protocol/interface/code_lens_params.rb +20 -2
  42. data/lib/language_server/protocol/interface/code_lens_registration_options.rb +25 -2
  43. data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +39 -0
  44. data/lib/language_server/protocol/interface/color_presentation.rb +7 -6
  45. data/lib/language_server/protocol/interface/color_presentation_params.rb +20 -2
  46. data/lib/language_server/protocol/interface/completion_client_capabilities.rb +1 -1
  47. data/lib/language_server/protocol/interface/completion_context.rb +5 -3
  48. data/lib/language_server/protocol/interface/completion_item.rb +60 -29
  49. data/lib/language_server/protocol/interface/completion_list.rb +2 -2
  50. data/lib/language_server/protocol/interface/completion_options.rb +21 -13
  51. data/lib/language_server/protocol/interface/completion_params.rb +40 -3
  52. data/lib/language_server/protocol/interface/completion_registration_options.rb +57 -2
  53. data/lib/language_server/protocol/interface/create_file.rb +10 -1
  54. data/lib/language_server/protocol/interface/create_files_params.rb +37 -0
  55. data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +3 -3
  56. data/lib/language_server/protocol/interface/declaration_options.rb +6 -1
  57. data/lib/language_server/protocol/interface/declaration_params.rb +38 -2
  58. data/lib/language_server/protocol/interface/declaration_registration_options.rb +27 -2
  59. data/lib/language_server/protocol/interface/definition_options.rb +6 -1
  60. data/lib/language_server/protocol/interface/definition_params.rb +38 -2
  61. data/lib/language_server/protocol/interface/definition_registration_options.rb +17 -2
  62. data/lib/language_server/protocol/interface/delete_file.rb +10 -1
  63. data/lib/language_server/protocol/interface/delete_files_params.rb +37 -0
  64. data/lib/language_server/protocol/interface/diagnostic.rb +21 -1
  65. data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
  66. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -9
  67. data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +3 -3
  68. data/lib/language_server/protocol/interface/document_color_options.rb +6 -1
  69. data/lib/language_server/protocol/interface/document_color_params.rb +20 -2
  70. data/lib/language_server/protocol/interface/document_color_registration_options.rb +27 -2
  71. data/lib/language_server/protocol/interface/document_filter.rb +7 -3
  72. data/lib/language_server/protocol/interface/document_formatting_options.rb +6 -1
  73. data/lib/language_server/protocol/interface/document_formatting_params.rb +9 -1
  74. data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +17 -2
  75. data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
  76. data/lib/language_server/protocol/interface/document_highlight_options.rb +6 -1
  77. data/lib/language_server/protocol/interface/document_highlight_params.rb +38 -2
  78. data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +17 -2
  79. data/lib/language_server/protocol/interface/document_link.rb +6 -5
  80. data/lib/language_server/protocol/interface/document_link_options.rb +6 -1
  81. data/lib/language_server/protocol/interface/document_link_params.rb +20 -2
  82. data/lib/language_server/protocol/interface/document_link_registration_options.rb +25 -2
  83. data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +17 -1
  84. data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +28 -2
  85. data/lib/language_server/protocol/interface/document_range_formatting_options.rb +6 -1
  86. data/lib/language_server/protocol/interface/document_range_formatting_params.rb +9 -1
  87. data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +17 -2
  88. data/lib/language_server/protocol/interface/document_symbol.rb +23 -11
  89. data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +24 -2
  90. data/lib/language_server/protocol/interface/document_symbol_options.rb +17 -2
  91. data/lib/language_server/protocol/interface/document_symbol_params.rb +20 -2
  92. data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +27 -2
  93. data/lib/language_server/protocol/interface/execute_command_options.rb +6 -1
  94. data/lib/language_server/protocol/interface/execute_command_params.rb +9 -1
  95. data/lib/language_server/protocol/interface/execute_command_registration_options.rb +14 -1
  96. data/lib/language_server/protocol/interface/file_create.rb +36 -0
  97. data/lib/language_server/protocol/interface/file_delete.rb +36 -0
  98. data/lib/language_server/protocol/interface/file_operation_filter.rb +46 -0
  99. data/lib/language_server/protocol/interface/file_operation_pattern.rb +67 -0
  100. data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +36 -0
  101. data/lib/language_server/protocol/interface/file_operation_registration_options.rb +36 -0
  102. data/lib/language_server/protocol/interface/file_rename.rb +45 -0
  103. data/lib/language_server/protocol/interface/file_system_watcher.rb +7 -3
  104. data/lib/language_server/protocol/interface/folding_range.rb +17 -8
  105. data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +10 -7
  106. data/lib/language_server/protocol/interface/folding_range_options.rb +6 -1
  107. data/lib/language_server/protocol/interface/folding_range_params.rb +20 -2
  108. data/lib/language_server/protocol/interface/folding_range_registration_options.rb +27 -2
  109. data/lib/language_server/protocol/interface/hover.rb +1 -1
  110. data/lib/language_server/protocol/interface/hover_client_capabilities.rb +3 -2
  111. data/lib/language_server/protocol/interface/hover_options.rb +6 -1
  112. data/lib/language_server/protocol/interface/hover_params.rb +28 -2
  113. data/lib/language_server/protocol/interface/hover_registration_options.rb +17 -2
  114. data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +3 -3
  115. data/lib/language_server/protocol/interface/implementation_options.rb +6 -1
  116. data/lib/language_server/protocol/interface/implementation_params.rb +38 -2
  117. data/lib/language_server/protocol/interface/implementation_registration_options.rb +27 -2
  118. data/lib/language_server/protocol/interface/initialize_params.rb +29 -6
  119. data/lib/language_server/protocol/interface/insert_replace_edit.rb +54 -0
  120. data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +36 -0
  121. data/lib/language_server/protocol/interface/linked_editing_range_options.rb +30 -0
  122. data/lib/language_server/protocol/interface/linked_editing_range_params.rb +51 -0
  123. data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +50 -0
  124. data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
  125. data/lib/language_server/protocol/interface/location_link.rb +9 -7
  126. data/lib/language_server/protocol/interface/log_message_params.rb +1 -1
  127. data/lib/language_server/protocol/interface/log_trace_params.rb +43 -0
  128. data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +45 -0
  129. data/lib/language_server/protocol/interface/markup_content.rb +9 -7
  130. data/lib/language_server/protocol/interface/moniker.rb +64 -0
  131. data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +36 -0
  132. data/lib/language_server/protocol/interface/moniker_options.rb +30 -0
  133. data/lib/language_server/protocol/interface/moniker_params.rb +61 -0
  134. data/lib/language_server/protocol/interface/moniker_registration_options.rb +40 -0
  135. data/lib/language_server/protocol/interface/notification_message.rb +6 -1
  136. data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +50 -0
  137. data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
  138. data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
  139. data/lib/language_server/protocol/interface/position.rb +5 -5
  140. data/lib/language_server/protocol/interface/prepare_rename_params.rb +17 -1
  141. data/lib/language_server/protocol/interface/progress_params.rb +1 -1
  142. data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +21 -1
  143. data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +2 -1
  144. data/lib/language_server/protocol/interface/reference_options.rb +6 -1
  145. data/lib/language_server/protocol/interface/reference_params.rb +38 -2
  146. data/lib/language_server/protocol/interface/reference_registration_options.rb +17 -2
  147. data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
  148. data/lib/language_server/protocol/interface/rename_client_capabilities.rb +27 -1
  149. data/lib/language_server/protocol/interface/rename_file.rb +10 -1
  150. data/lib/language_server/protocol/interface/rename_files_params.rb +38 -0
  151. data/lib/language_server/protocol/interface/rename_options.rb +6 -1
  152. data/lib/language_server/protocol/interface/rename_params.rb +28 -2
  153. data/lib/language_server/protocol/interface/rename_registration_options.rb +25 -2
  154. data/lib/language_server/protocol/interface/request_message.rb +6 -1
  155. data/lib/language_server/protocol/interface/response_message.rb +6 -1
  156. data/lib/language_server/protocol/interface/selection_range.rb +2 -1
  157. data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -3
  158. data/lib/language_server/protocol/interface/selection_range_options.rb +6 -1
  159. data/lib/language_server/protocol/interface/selection_range_params.rb +20 -2
  160. data/lib/language_server/protocol/interface/selection_range_registration_options.rb +27 -2
  161. data/lib/language_server/protocol/interface/semantic_tokens.rb +45 -0
  162. data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +97 -0
  163. data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +40 -0
  164. data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +62 -0
  165. data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +30 -0
  166. data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +51 -0
  167. data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +42 -0
  168. data/lib/language_server/protocol/interface/semantic_tokens_options.rb +58 -0
  169. data/lib/language_server/protocol/interface/semantic_tokens_params.rb +52 -0
  170. data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +30 -0
  171. data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +61 -0
  172. data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +78 -0
  173. data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
  174. data/lib/language_server/protocol/interface/server_capabilities.rb +47 -9
  175. data/lib/language_server/protocol/interface/set_trace_params.rb +33 -0
  176. data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +37 -0
  177. data/lib/language_server/protocol/interface/show_document_params.rb +71 -0
  178. data/lib/language_server/protocol/interface/show_document_result.rb +36 -0
  179. data/lib/language_server/protocol/interface/show_message_params.rb +1 -1
  180. data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +36 -0
  181. data/lib/language_server/protocol/interface/show_message_request_params.rb +1 -1
  182. data/lib/language_server/protocol/interface/signature_help.rb +3 -3
  183. data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +1 -1
  184. data/lib/language_server/protocol/interface/signature_help_context.rb +10 -7
  185. data/lib/language_server/protocol/interface/signature_help_options.rb +9 -3
  186. data/lib/language_server/protocol/interface/signature_help_params.rb +31 -4
  187. data/lib/language_server/protocol/interface/signature_help_registration_options.rb +38 -2
  188. data/lib/language_server/protocol/interface/signature_information.rb +12 -1
  189. data/lib/language_server/protocol/interface/symbol_information.rb +10 -1
  190. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +11 -2
  191. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +39 -2
  192. data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
  193. data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
  194. data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
  195. data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +10 -1
  196. data/lib/language_server/protocol/interface/text_document_sync_options.rb +13 -15
  197. data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +3 -3
  198. data/lib/language_server/protocol/interface/type_definition_options.rb +6 -1
  199. data/lib/language_server/protocol/interface/type_definition_params.rb +38 -2
  200. data/lib/language_server/protocol/interface/type_definition_registration_options.rb +27 -2
  201. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +12 -8
  202. data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
  203. data/lib/language_server/protocol/interface/work_done_progress_begin.rb +3 -3
  204. data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +1 -1
  205. data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +1 -1
  206. data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
  207. data/lib/language_server/protocol/interface/work_done_progress_report.rb +5 -5
  208. data/lib/language_server/protocol/interface/workspace_edit.rb +24 -7
  209. data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +23 -1
  210. data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +13 -2
  211. data/lib/language_server/protocol/interface/workspace_symbol_options.rb +6 -1
  212. data/lib/language_server/protocol/interface/workspace_symbol_params.rb +20 -2
  213. data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +6 -1
  214. data/lib/language_server/protocol/interface.rb +112 -0
  215. data/lib/language_server/protocol/transport/io/reader.rb +8 -24
  216. data/lib/language_server/protocol/transport/io/writer.rb +1 -0
  217. data/lib/language_server/protocol/version.rb +1 -1
  218. metadata +68 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b5fde92bed345f77036a2567f05660c232a066ce396c4beec567f7d3977d990
4
- data.tar.gz: dfc01eb518d296736b57711f7ca90429d8eace05e6fe6f7c54db3c3b95f0cd1d
3
+ metadata.gz: d19c5c039606efbbc57298c563b1a239c089b2598f0ed2d858e0109a6f255d92
4
+ data.tar.gz: 2e6b7d482808b24cf7dce34b933fe6af17e989934871226165ebe3466179024c
5
5
  SHA512:
6
- metadata.gz: 723a69d189e3470e2ed83a6de5be41a4dd66ab91f34bb72b60da52011eafcaa99fe1a8ec0aeb443ef49b038499cf3af7eea9d820c06836ebd78b675f39404bb7
7
- data.tar.gz: 52da49bc93835dbd23af8661417782382a3342103166fb049eb6ba1e1edb5b0d17333533fe17f109834615a7290cc28c1f2a18c95c61c69ff4a5ba1c6b153ef5
6
+ metadata.gz: e54fb19dbc55a1373eb9920b463167a11b6805c6b31a0d8dc6c2d77dedcec755460d47cf08c5624208e071ee029463043f466192a265af8d897daf02227d39ed
7
+ data.tar.gz: 5badb34f7bec3ca1bc2c6a791f3e3eed615bb65e118159a014ab425cc4950d5b8eff6736a8375324aaee5099e6244c57e18f9a874dde1b09deab837934db983a
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A Language Server Protocol SDK for Ruby.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/language_server-protocol.svg)](https://badge.fury.io/rb/language_server-protocol)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -83,4 +85,4 @@ The gem is available as open source under the terms of the [MIT License](http://
83
85
 
84
86
  ## Code of Conduct
85
87
 
86
- Everyone interacting in the LanguageServer::Protocol project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/language_server-protocol/blob/master/CODE_OF_CONDUCT.md).
88
+ Everyone interacting in the LanguageServer::Protocol project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mtsmfm/language_server-protocol/blob/master/CODE_OF_CONDUCT.md).
@@ -4,10 +4,11 @@ module LanguageServer
4
4
  #
5
5
  # The kind of a code action.
6
6
  #
7
- # Kinds are a hierarchical list of identifiers separated by `.`, e.g. `"refactor.extract.function"`.
7
+ # Kinds are a hierarchical list of identifiers separated by `.`,
8
+ # e.g. `"refactor.extract.function"`.
8
9
  #
9
- # The set of kinds is open and client needs to announce the kinds it supports to the server during
10
- # initialization.
10
+ # The set of kinds is open and client needs to announce the kinds it supports
11
+ # to the server during initialization.
11
12
  # A set of predefined code action kinds.
12
13
  #
13
14
  module CodeActionKind
@@ -66,7 +67,8 @@ module LanguageServer
66
67
  #
67
68
  SOURCE = 'source'
68
69
  #
69
- # Base kind for an organize imports source action: `source.organizeImports`.
70
+ # Base kind for an organize imports source action:
71
+ # `source.organizeImports`.
70
72
  #
71
73
  SOURCE_ORGANIZE_IMPORTS = 'source.organizeImports'
72
74
  end
@@ -2,8 +2,8 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Constant
4
4
  #
5
- # Completion item tags are extra annotations that tweak the rendering of a completion
6
- # item.
5
+ # Completion item tags are extra annotations that tweak the rendering of a
6
+ # completion item.
7
7
  #
8
8
  module CompletionItemTag
9
9
  #
@@ -12,7 +12,8 @@ module LanguageServer
12
12
  INVOKED = 1
13
13
  #
14
14
  # Completion was triggered by a trigger character specified by
15
- # the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
15
+ # the `triggerCharacters` properties of the
16
+ # `CompletionRegistrationOptions`.
16
17
  #
17
18
  TRIGGER_CHARACTER = 2
18
19
  #
@@ -8,8 +8,8 @@ module LanguageServer
8
8
  #
9
9
  # Unused or unnecessary code.
10
10
  #
11
- # Clients are allowed to render diagnostics with this tag faded out instead of having
12
- # an error squiggle.
11
+ # Clients are allowed to render diagnostics with this tag faded out
12
+ # instead of having an error squiggle.
13
13
  #
14
14
  UNNECESSARY = 1
15
15
  #
@@ -7,12 +7,35 @@ module LanguageServer
7
7
  METHOD_NOT_FOUND = -32601
8
8
  INVALID_PARAMS = -32602
9
9
  INTERNAL_ERROR = -32603
10
- SERVER_ERROR_START = -32099
11
- SERVER_ERROR_END = -32000
10
+ #
11
+ # This is the start range of JSON RPC reserved error codes.
12
+ # It doesn't denote a real error code. No LSP error codes should
13
+ # be defined between the start and end range. For backwards
14
+ # compatibility the `ServerNotInitialized` and the `UnknownErrorCode`
15
+ # are left in the range.
16
+ #
17
+ JSONRPC_RESERVED_ERROR_RANGE_START = -32099
18
+ SERVER_ERROR_START = JSONRPC_RESERVED_ERROR_RANGE_START
12
19
  SERVER_NOT_INITIALIZED = -32002
13
20
  UNKNOWN_ERROR_CODE = -32001
14
- REQUEST_CANCELLED = -32800
21
+ #
22
+ # This is the start range of JSON RPC reserved error codes.
23
+ # It doesn't denote a real error code.
24
+ #
25
+ JSONRPC_RESERVED_ERROR_RANGE_END = -32000
26
+ SERVER_ERROR_END = JSONRPC_RESERVED_ERROR_RANGE_END
27
+ #
28
+ # This is the start range of LSP reserved error codes.
29
+ # It doesn't denote a real error code.
30
+ #
31
+ LSP_RESERVED_ERROR_RANGE_START = -32899
15
32
  CONTENT_MODIFIED = -32801
33
+ REQUEST_CANCELLED = -32800
34
+ #
35
+ # This is the end range of LSP reserved error codes.
36
+ # It doesn't denote a real error code.
37
+ #
38
+ LSP_RESERVED_ERROR_RANGE_END = -32800
16
39
  end
17
40
  end
18
41
  end
@@ -3,8 +3,9 @@ module LanguageServer
3
3
  module Constant
4
4
  module FailureHandlingKind
5
5
  #
6
- # Applying the workspace change is simply aborted if one of the changes provided
7
- # fails. All operations executed before the failing operation stay executed.
6
+ # Applying the workspace change is simply aborted if one of the changes
7
+ # provided fails. All operations executed before the failing operation
8
+ # stay executed.
8
9
  #
9
10
  ABORT = 'abort'
10
11
  #
@@ -13,9 +14,9 @@ module LanguageServer
13
14
  #
14
15
  TRANSACTIONAL = 'transactional'
15
16
  #
16
- # If the workspace edit contains only textual file changes they are executed transactional.
17
- # If resource changes (create, rename or delete file) are part of the change the failure
18
- # handling strategy is abort.
17
+ # If the workspace edit contains only textual file changes they are
18
+ # executed transactional. If resource changes (create, rename or delete
19
+ # file) are part of the change the failure handling strategy is abort.
19
20
  #
20
21
  TEXT_ONLY_TRANSACTIONAL = 'textOnlyTransactional'
21
22
  #
@@ -0,0 +1,20 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # A pattern kind describing if a glob pattern matches a file a folder or
6
+ # both.
7
+ #
8
+ module FileOperationPatternKind
9
+ #
10
+ # The pattern matches a file only.
11
+ #
12
+ FILE = 'file'
13
+ #
14
+ # The pattern matches a folder only.
15
+ #
16
+ FOLDER = 'folder'
17
+ end
18
+ end
19
+ end
20
+ end
@@ -6,7 +6,8 @@ module LanguageServer
6
6
  #
7
7
  module InitializeError
8
8
  #
9
- # If the protocol version provided by the client can't be handled by the server.
9
+ # If the protocol version provided by the client can't be handled by the
10
+ # server.
10
11
  #
11
12
  UNKNOWN_PROTOCOL_VERSION = 1
12
13
  end
@@ -0,0 +1,30 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # How whitespace and indentation is handled during completion
6
+ # item insertion.
7
+ #
8
+ module InsertTextMode
9
+ #
10
+ # The insertion or replace strings is taken as it is. If the
11
+ # value is multi line the lines below the cursor will be
12
+ # inserted using the indentation defined in the string value.
13
+ # The client will not apply any kind of adjustments to the
14
+ # string.
15
+ #
16
+ AS_IS = 1
17
+ #
18
+ # The editor adjusts leading whitespace of new lines so that
19
+ # they match the indentation up to the cursor of the line for
20
+ # which the item is accepted.
21
+ #
22
+ # Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
23
+ # multi line completion item is indented using 2 tabs and all
24
+ # following lines inserted will be indented using 2 tabs as well.
25
+ #
26
+ ADJUST_INDENTATION = 2
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,13 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ module PrepareSupportDefaultBehavior
5
+ #
6
+ # The client's default behavior is to select the identifier
7
+ # according the to language's syntax rule.
8
+ #
9
+ IDENTIFIER = 1
10
+ end
11
+ end
12
+ end
13
+ end
@@ -14,7 +14,8 @@ module LanguageServer
14
14
  #
15
15
  TRIGGER_CHARACTER = 2
16
16
  #
17
- # Signature help was triggered by the cursor moving or by the document content changing.
17
+ # Signature help was triggered by the cursor moving or by the document
18
+ # content changing.
18
19
  #
19
20
  CONTENT_CHANGE = 3
20
21
  end
@@ -0,0 +1,15 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # Symbol tags are extra annotations that tweak the rendering of a symbol.
6
+ #
7
+ module SymbolTag
8
+ #
9
+ # Render a symbol as obsolete, usually using a strike-out.
10
+ #
11
+ DEPRECATED = 1
12
+ end
13
+ end
14
+ end
15
+ end
@@ -6,8 +6,8 @@ module LanguageServer
6
6
  #
7
7
  module TextDocumentSaveReason
8
8
  #
9
- # Manually triggered, e.g. by the user pressing save, by starting debugging,
10
- # or by an API call.
9
+ # Manually triggered, e.g. by the user pressing save, by starting
10
+ # debugging, or by an API call.
11
11
  #
12
12
  MANUAL = 1
13
13
  #
@@ -2,8 +2,8 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Constant
4
4
  #
5
- # Defines how the host (editor) should sync document changes to the language server.
6
- # Defines how the host (editor) should sync document changes to the language server.
5
+ # Defines how the host (editor) should sync document changes to the language
6
+ # server.
7
7
  #
8
8
  module TextDocumentSyncKind
9
9
  #
@@ -0,0 +1,9 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ module TokenFormat
5
+ RELATIVE = 'relative'
6
+ end
7
+ end
8
+ end
9
+ end
@@ -11,16 +11,21 @@ module LanguageServer
11
11
  autoload :ErrorCodes, "language_server/protocol/constant/error_codes"
12
12
  autoload :FailureHandlingKind, "language_server/protocol/constant/failure_handling_kind"
13
13
  autoload :FileChangeType, "language_server/protocol/constant/file_change_type"
14
+ autoload :FileOperationPatternKind, "language_server/protocol/constant/file_operation_pattern_kind"
14
15
  autoload :InitializeError, "language_server/protocol/constant/initialize_error"
15
16
  autoload :InsertTextFormat, "language_server/protocol/constant/insert_text_format"
17
+ autoload :InsertTextMode, "language_server/protocol/constant/insert_text_mode"
16
18
  autoload :MarkupKind, "language_server/protocol/constant/markup_kind"
17
19
  autoload :MessageType, "language_server/protocol/constant/message_type"
20
+ autoload :PrepareSupportDefaultBehavior, "language_server/protocol/constant/prepare_support_default_behavior"
18
21
  autoload :ResourceOperationKind, "language_server/protocol/constant/resource_operation_kind"
19
22
  autoload :SignatureHelpTriggerKind, "language_server/protocol/constant/signature_help_trigger_kind"
20
23
  autoload :SymbolKind, "language_server/protocol/constant/symbol_kind"
24
+ autoload :SymbolTag, "language_server/protocol/constant/symbol_tag"
21
25
  autoload :TextDocumentSaveReason, "language_server/protocol/constant/text_document_save_reason"
22
26
  autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
23
27
  autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
28
+ autoload :TokenFormat, "language_server/protocol/constant/token_format"
24
29
  autoload :WatchKind, "language_server/protocol/constant/watch_kind"
25
30
 
26
31
  require "language_server/protocol/constant/code_action_kind"
@@ -33,16 +38,21 @@ module LanguageServer
33
38
  require "language_server/protocol/constant/error_codes"
34
39
  require "language_server/protocol/constant/failure_handling_kind"
35
40
  require "language_server/protocol/constant/file_change_type"
41
+ require "language_server/protocol/constant/file_operation_pattern_kind"
36
42
  require "language_server/protocol/constant/initialize_error"
37
43
  require "language_server/protocol/constant/insert_text_format"
44
+ require "language_server/protocol/constant/insert_text_mode"
38
45
  require "language_server/protocol/constant/markup_kind"
39
46
  require "language_server/protocol/constant/message_type"
47
+ require "language_server/protocol/constant/prepare_support_default_behavior"
40
48
  require "language_server/protocol/constant/resource_operation_kind"
41
49
  require "language_server/protocol/constant/signature_help_trigger_kind"
42
50
  require "language_server/protocol/constant/symbol_kind"
51
+ require "language_server/protocol/constant/symbol_tag"
43
52
  require "language_server/protocol/constant/text_document_save_reason"
44
53
  require "language_server/protocol/constant/text_document_sync_kind"
45
54
  require "language_server/protocol/constant/text_document_sync_kind"
55
+ require "language_server/protocol/constant/token_format"
46
56
  require "language_server/protocol/constant/watch_kind"
47
57
  end
48
58
  end
@@ -0,0 +1,56 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # A special text edit with an additional change annotation.
6
+ #
7
+ class AnnotatedTextEdit
8
+ def initialize(range:, new_text:, annotation_id:)
9
+ @attributes = {}
10
+
11
+ @attributes[:range] = range
12
+ @attributes[:newText] = new_text
13
+ @attributes[:annotationId] = annotation_id
14
+
15
+ @attributes.freeze
16
+ end
17
+
18
+ #
19
+ # The range of the text document to be manipulated. To insert
20
+ # text into a document create a range where start === end.
21
+ #
22
+ # @return [Range]
23
+ def range
24
+ attributes.fetch(:range)
25
+ end
26
+
27
+ #
28
+ # The string to be inserted. For delete operations use an
29
+ # empty string.
30
+ #
31
+ # @return [string]
32
+ def new_text
33
+ attributes.fetch(:newText)
34
+ end
35
+
36
+ #
37
+ # The actual annotation identifier.
38
+ #
39
+ # @return [string]
40
+ def annotation_id
41
+ attributes.fetch(:annotationId)
42
+ end
43
+
44
+ attr_reader :attributes
45
+
46
+ def to_hash
47
+ attributes
48
+ end
49
+
50
+ def to_json(*args)
51
+ to_hash.to_json(*args)
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -2,11 +2,12 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  class ApplyWorkspaceEditResponse
5
- def initialize(applied:, failure_reason: nil)
5
+ def initialize(applied:, failure_reason: nil, failed_change: nil)
6
6
  @attributes = {}
7
7
 
8
8
  @attributes[:applied] = applied
9
9
  @attributes[:failureReason] = failure_reason if failure_reason
10
+ @attributes[:failedChange] = failed_change if failed_change
10
11
 
11
12
  @attributes.freeze
12
13
  end
@@ -21,15 +22,25 @@ module LanguageServer
21
22
 
22
23
  #
23
24
  # An optional textual description for why the edit was not applied.
24
- # This may be used may be used by the server for diagnostic
25
- # logging or to provide a suitable error for a request that
26
- # triggered the edit.
25
+ # This may be used by the server for diagnostic logging or to provide
26
+ # a suitable error for a request that triggered the edit.
27
27
  #
28
28
  # @return [string]
29
29
  def failure_reason
30
30
  attributes.fetch(:failureReason)
31
31
  end
32
32
 
33
+ #
34
+ # Depending on the client's failure handling strategy `failedChange`
35
+ # might contain the index of the change that failed. This property is
36
+ # only available if the client signals a `failureHandlingStrategy`
37
+ # in its client capabilities.
38
+ #
39
+ # @return [number]
40
+ def failed_change
41
+ attributes.fetch(:failedChange)
42
+ end
43
+
33
44
  attr_reader :attributes
34
45
 
35
46
  def to_hash
@@ -0,0 +1,36 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ class CallHierarchyClientCapabilities
5
+ def initialize(dynamic_registration: nil)
6
+ @attributes = {}
7
+
8
+ @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
9
+
10
+ @attributes.freeze
11
+ end
12
+
13
+ #
14
+ # Whether implementation supports dynamic registration. If this is set to
15
+ # `true` the client supports the new `(TextDocumentRegistrationOptions &
16
+ # StaticRegistrationOptions)` return value for the corresponding server
17
+ # capability as well.
18
+ #
19
+ # @return [boolean]
20
+ def dynamic_registration
21
+ attributes.fetch(:dynamicRegistration)
22
+ end
23
+
24
+ attr_reader :attributes
25
+
26
+ def to_hash
27
+ attributes
28
+ end
29
+
30
+ def to_json(*args)
31
+ to_hash.to_json(*args)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end