language_server-protocol 3.15.0.2 → 3.16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/language_server/protocol/constant.rb +10 -0
  4. data/lib/language_server/protocol/constant/code_action_kind.rb +6 -4
  5. data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -2
  6. data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
  7. data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -2
  8. data/lib/language_server/protocol/constant/error_codes.rb +26 -3
  9. data/lib/language_server/protocol/constant/failure_handling_kind.rb +6 -5
  10. data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +20 -0
  11. data/lib/language_server/protocol/constant/initialize_error.rb +2 -1
  12. data/lib/language_server/protocol/constant/insert_text_mode.rb +30 -0
  13. data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +13 -0
  14. data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -1
  15. data/lib/language_server/protocol/constant/symbol_tag.rb +15 -0
  16. data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
  17. data/lib/language_server/protocol/constant/text_document_sync_kind.rb +2 -2
  18. data/lib/language_server/protocol/constant/token_format.rb +9 -0
  19. data/lib/language_server/protocol/interface.rb +112 -0
  20. data/lib/language_server/protocol/interface/annotated_text_edit.rb +38 -0
  21. data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +15 -4
  22. data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +36 -0
  23. data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +43 -0
  24. data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +31 -0
  25. data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
  26. data/lib/language_server/protocol/interface/call_hierarchy_options.rb +25 -0
  27. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +43 -0
  28. data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +31 -0
  29. data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +25 -0
  30. data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +25 -0
  31. data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
  32. data/lib/language_server/protocol/interface/client_capabilities.rb +12 -3
  33. data/lib/language_server/protocol/interface/code_action.rb +43 -8
  34. data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +44 -1
  35. data/lib/language_server/protocol/interface/code_action_context.rb +7 -6
  36. data/lib/language_server/protocol/interface/code_action_options.rb +13 -3
  37. data/lib/language_server/protocol/interface/code_action_registration_options.rb +2 -1
  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_workspace_client_capabilities.rb +39 -0
  41. data/lib/language_server/protocol/interface/color_presentation.rb +7 -6
  42. data/lib/language_server/protocol/interface/completion_client_capabilities.rb +1 -1
  43. data/lib/language_server/protocol/interface/completion_context.rb +5 -3
  44. data/lib/language_server/protocol/interface/completion_item.rb +60 -29
  45. data/lib/language_server/protocol/interface/completion_list.rb +2 -2
  46. data/lib/language_server/protocol/interface/completion_options.rb +15 -12
  47. data/lib/language_server/protocol/interface/completion_params.rb +2 -1
  48. data/lib/language_server/protocol/interface/create_file.rb +10 -1
  49. data/lib/language_server/protocol/interface/create_files_params.rb +37 -0
  50. data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +3 -3
  51. data/lib/language_server/protocol/interface/delete_file.rb +10 -1
  52. data/lib/language_server/protocol/interface/delete_files_params.rb +37 -0
  53. data/lib/language_server/protocol/interface/diagnostic.rb +21 -1
  54. data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
  55. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -9
  56. data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +3 -3
  57. data/lib/language_server/protocol/interface/document_filter.rb +7 -3
  58. data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
  59. data/lib/language_server/protocol/interface/document_link.rb +6 -5
  60. data/lib/language_server/protocol/interface/document_symbol.rb +23 -11
  61. data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +24 -2
  62. data/lib/language_server/protocol/interface/document_symbol_options.rb +11 -1
  63. data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +2 -1
  64. data/lib/language_server/protocol/interface/file_create.rb +36 -0
  65. data/lib/language_server/protocol/interface/file_delete.rb +36 -0
  66. data/lib/language_server/protocol/interface/file_operation_filter.rb +46 -0
  67. data/lib/language_server/protocol/interface/file_operation_pattern.rb +67 -0
  68. data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +36 -0
  69. data/lib/language_server/protocol/interface/file_operation_registration_options.rb +36 -0
  70. data/lib/language_server/protocol/interface/file_rename.rb +45 -0
  71. data/lib/language_server/protocol/interface/file_system_watcher.rb +7 -3
  72. data/lib/language_server/protocol/interface/folding_range.rb +17 -8
  73. data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +10 -7
  74. data/lib/language_server/protocol/interface/hover.rb +1 -1
  75. data/lib/language_server/protocol/interface/hover_client_capabilities.rb +3 -2
  76. data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +3 -3
  77. data/lib/language_server/protocol/interface/initialize_params.rb +20 -5
  78. data/lib/language_server/protocol/interface/insert_replace_edit.rb +54 -0
  79. data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +36 -0
  80. data/lib/language_server/protocol/interface/linked_editing_range_options.rb +25 -0
  81. data/lib/language_server/protocol/interface/linked_editing_range_params.rb +25 -0
  82. data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +25 -0
  83. data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
  84. data/lib/language_server/protocol/interface/location_link.rb +9 -7
  85. data/lib/language_server/protocol/interface/log_message_params.rb +1 -1
  86. data/lib/language_server/protocol/interface/log_trace_params.rb +43 -0
  87. data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +45 -0
  88. data/lib/language_server/protocol/interface/markup_content.rb +9 -7
  89. data/lib/language_server/protocol/interface/moniker.rb +64 -0
  90. data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +36 -0
  91. data/lib/language_server/protocol/interface/moniker_options.rb +25 -0
  92. data/lib/language_server/protocol/interface/moniker_params.rb +25 -0
  93. data/lib/language_server/protocol/interface/moniker_registration_options.rb +25 -0
  94. data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +42 -0
  95. data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
  96. data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
  97. data/lib/language_server/protocol/interface/position.rb +5 -5
  98. data/lib/language_server/protocol/interface/progress_params.rb +1 -1
  99. data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +21 -1
  100. data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +2 -1
  101. data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
  102. data/lib/language_server/protocol/interface/rename_client_capabilities.rb +27 -1
  103. data/lib/language_server/protocol/interface/rename_file.rb +10 -1
  104. data/lib/language_server/protocol/interface/rename_files_params.rb +38 -0
  105. data/lib/language_server/protocol/interface/selection_range.rb +2 -1
  106. data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -3
  107. data/lib/language_server/protocol/interface/semantic_tokens.rb +45 -0
  108. data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +97 -0
  109. data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +40 -0
  110. data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +44 -0
  111. data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +30 -0
  112. data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +51 -0
  113. data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +42 -0
  114. data/lib/language_server/protocol/interface/semantic_tokens_options.rb +53 -0
  115. data/lib/language_server/protocol/interface/semantic_tokens_params.rb +34 -0
  116. data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +30 -0
  117. data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +43 -0
  118. data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +25 -0
  119. data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
  120. data/lib/language_server/protocol/interface/server_capabilities.rb +47 -9
  121. data/lib/language_server/protocol/interface/set_trace_params.rb +33 -0
  122. data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +37 -0
  123. data/lib/language_server/protocol/interface/show_document_params.rb +71 -0
  124. data/lib/language_server/protocol/interface/show_document_result.rb +36 -0
  125. data/lib/language_server/protocol/interface/show_message_params.rb +1 -1
  126. data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +36 -0
  127. data/lib/language_server/protocol/interface/show_message_request_params.rb +1 -1
  128. data/lib/language_server/protocol/interface/signature_help.rb +3 -3
  129. data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +1 -1
  130. data/lib/language_server/protocol/interface/signature_help_context.rb +10 -7
  131. data/lib/language_server/protocol/interface/signature_help_options.rb +3 -2
  132. data/lib/language_server/protocol/interface/signature_help_params.rb +3 -2
  133. data/lib/language_server/protocol/interface/signature_information.rb +12 -1
  134. data/lib/language_server/protocol/interface/symbol_information.rb +10 -1
  135. data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +1 -1
  136. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +39 -2
  137. data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
  138. data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
  139. data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
  140. data/lib/language_server/protocol/interface/text_document_sync_options.rb +13 -15
  141. data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +3 -3
  142. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +3 -7
  143. data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
  144. data/lib/language_server/protocol/interface/work_done_progress_begin.rb +3 -3
  145. data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +1 -1
  146. data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +1 -1
  147. data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
  148. data/lib/language_server/protocol/interface/work_done_progress_report.rb +5 -5
  149. data/lib/language_server/protocol/interface/workspace_edit.rb +24 -7
  150. data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +23 -1
  151. data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +13 -2
  152. data/lib/language_server/protocol/version.rb +1 -1
  153. metadata +67 -6
@@ -2,7 +2,7 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  class ServerCapabilities
5
- def initialize(text_document_sync: nil, completion_provider: nil, hover_provider: nil, signature_help_provider: nil, declaration_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_link_provider: nil, color_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, folding_range_provider: nil, execute_command_provider: nil, selection_range_provider: nil, workspace_symbol_provider: nil, workspace: nil, experimental: nil)
5
+ def initialize(text_document_sync: nil, completion_provider: nil, hover_provider: nil, signature_help_provider: nil, declaration_provider: nil, definition_provider: nil, type_definition_provider: nil, implementation_provider: nil, references_provider: nil, document_highlight_provider: nil, document_symbol_provider: nil, code_action_provider: nil, code_lens_provider: nil, document_link_provider: nil, color_provider: nil, document_formatting_provider: nil, document_range_formatting_provider: nil, document_on_type_formatting_provider: nil, rename_provider: nil, folding_range_provider: nil, execute_command_provider: nil, selection_range_provider: nil, linked_editing_range_provider: nil, call_hierarchy_provider: nil, semantic_tokens_provider: nil, moniker_provider: nil, workspace_symbol_provider: nil, workspace: nil, experimental: nil)
6
6
  @attributes = {}
7
7
 
8
8
  @attributes[:textDocumentSync] = text_document_sync if text_document_sync
@@ -27,6 +27,10 @@ module LanguageServer
27
27
  @attributes[:foldingRangeProvider] = folding_range_provider if folding_range_provider
28
28
  @attributes[:executeCommandProvider] = execute_command_provider if execute_command_provider
29
29
  @attributes[:selectionRangeProvider] = selection_range_provider if selection_range_provider
30
+ @attributes[:linkedEditingRangeProvider] = linked_editing_range_provider if linked_editing_range_provider
31
+ @attributes[:callHierarchyProvider] = call_hierarchy_provider if call_hierarchy_provider
32
+ @attributes[:semanticTokensProvider] = semantic_tokens_provider if semantic_tokens_provider
33
+ @attributes[:monikerProvider] = moniker_provider if moniker_provider
30
34
  @attributes[:workspaceSymbolProvider] = workspace_symbol_provider if workspace_symbol_provider
31
35
  @attributes[:workspace] = workspace if workspace
32
36
  @attributes[:experimental] = experimental if experimental
@@ -35,10 +39,12 @@ module LanguageServer
35
39
  end
36
40
 
37
41
  #
38
- # Defines how text documents are synced. Is either a detailed structure defining each notification or
39
- # for backwards compatibility the TextDocumentSyncKind number. If omitted it defaults to `TextDocumentSyncKind.None`.
42
+ # Defines how text documents are synced. Is either a detailed structure
43
+ # defining each notification or for backwards compatibility the
44
+ # TextDocumentSyncKind number. If omitted it defaults to
45
+ # `TextDocumentSyncKind.None`.
40
46
  #
41
- # @return [number | TextDocumentSyncOptions]
47
+ # @return [TextDocumentSyncOptions | TextDocumentSyncKind]
42
48
  def text_document_sync
43
49
  attributes.fetch(:textDocumentSync)
44
50
  end
@@ -124,9 +130,9 @@ module LanguageServer
124
130
  end
125
131
 
126
132
  #
127
- # The server provides code actions. The `CodeActionOptions` return type is only
128
- # valid if the client signals code action literal support via the property
129
- # `textDocument.codeAction.codeActionLiteralSupport`.
133
+ # The server provides code actions. The `CodeActionOptions` return type is
134
+ # only valid if the client signals code action literal support via the
135
+ # property `textDocument.codeAction.codeActionLiteralSupport`.
130
136
  #
131
137
  # @return [boolean | CodeActionOptions]
132
138
  def code_action_provider
@@ -215,10 +221,42 @@ module LanguageServer
215
221
  attributes.fetch(:selectionRangeProvider)
216
222
  end
217
223
 
224
+ #
225
+ # The server provides linked editing range support.
226
+ #
227
+ # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions]
228
+ def linked_editing_range_provider
229
+ attributes.fetch(:linkedEditingRangeProvider)
230
+ end
231
+
232
+ #
233
+ # The server provides call hierarchy support.
234
+ #
235
+ # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions]
236
+ def call_hierarchy_provider
237
+ attributes.fetch(:callHierarchyProvider)
238
+ end
239
+
240
+ #
241
+ # The server provides semantic tokens support.
242
+ #
243
+ # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions]
244
+ def semantic_tokens_provider
245
+ attributes.fetch(:semanticTokensProvider)
246
+ end
247
+
248
+ #
249
+ # Whether server provides moniker support.
250
+ #
251
+ # @return [boolean | MonikerOptions | MonikerRegistrationOptions]
252
+ def moniker_provider
253
+ attributes.fetch(:monikerProvider)
254
+ end
255
+
218
256
  #
219
257
  # The server provides workspace symbol support.
220
258
  #
221
- # @return [boolean]
259
+ # @return [boolean | WorkspaceSymbolOptions]
222
260
  def workspace_symbol_provider
223
261
  attributes.fetch(:workspaceSymbolProvider)
224
262
  end
@@ -226,7 +264,7 @@ module LanguageServer
226
264
  #
227
265
  # Workspace specific server capabilities
228
266
  #
229
- # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; }]
267
+ # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }]
230
268
  def workspace
231
269
  attributes.fetch(:workspace)
232
270
  end
@@ -0,0 +1,33 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ class SetTraceParams
5
+ def initialize(value:)
6
+ @attributes = {}
7
+
8
+ @attributes[:value] = value
9
+
10
+ @attributes.freeze
11
+ end
12
+
13
+ #
14
+ # The new value that should be assigned to the trace setting.
15
+ #
16
+ # @return [TraceValue]
17
+ def value
18
+ attributes.fetch(:value)
19
+ end
20
+
21
+ attr_reader :attributes
22
+
23
+ def to_hash
24
+ attributes
25
+ end
26
+
27
+ def to_json(*args)
28
+ to_hash.to_json(*args)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,37 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Client capabilities for the show document request.
6
+ #
7
+ class ShowDocumentClientCapabilities
8
+ def initialize(support:)
9
+ @attributes = {}
10
+
11
+ @attributes[:support] = support
12
+
13
+ @attributes.freeze
14
+ end
15
+
16
+ #
17
+ # The client has support for the show document
18
+ # request.
19
+ #
20
+ # @return [boolean]
21
+ def support
22
+ attributes.fetch(:support)
23
+ end
24
+
25
+ attr_reader :attributes
26
+
27
+ def to_hash
28
+ attributes
29
+ end
30
+
31
+ def to_json(*args)
32
+ to_hash.to_json(*args)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,71 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Params to show a document.
6
+ #
7
+ class ShowDocumentParams
8
+ def initialize(uri:, external: nil, take_focus: nil, selection: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:uri] = uri
12
+ @attributes[:external] = external if external
13
+ @attributes[:takeFocus] = take_focus if take_focus
14
+ @attributes[:selection] = selection if selection
15
+
16
+ @attributes.freeze
17
+ end
18
+
19
+ #
20
+ # The document uri to show.
21
+ #
22
+ # @return [string]
23
+ def uri
24
+ attributes.fetch(:uri)
25
+ end
26
+
27
+ #
28
+ # Indicates to show the resource in an external program.
29
+ # To show for example `https://code.visualstudio.com/`
30
+ # in the default WEB browser set `external` to `true`.
31
+ #
32
+ # @return [boolean]
33
+ def external
34
+ attributes.fetch(:external)
35
+ end
36
+
37
+ #
38
+ # An optional property to indicate whether the editor
39
+ # showing the document should take focus or not.
40
+ # Clients might ignore this property if an external
41
+ # program is started.
42
+ #
43
+ # @return [boolean]
44
+ def take_focus
45
+ attributes.fetch(:takeFocus)
46
+ end
47
+
48
+ #
49
+ # An optional selection range if the document is a text
50
+ # document. Clients might ignore the property if an
51
+ # external program is started or the file is not a text
52
+ # file.
53
+ #
54
+ # @return [Range]
55
+ def selection
56
+ attributes.fetch(:selection)
57
+ end
58
+
59
+ attr_reader :attributes
60
+
61
+ def to_hash
62
+ attributes
63
+ end
64
+
65
+ def to_json(*args)
66
+ to_hash.to_json(*args)
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,36 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # The result of an show document request.
6
+ #
7
+ class ShowDocumentResult
8
+ def initialize(success:)
9
+ @attributes = {}
10
+
11
+ @attributes[:success] = success
12
+
13
+ @attributes.freeze
14
+ end
15
+
16
+ #
17
+ # A boolean indicating if the show was successful.
18
+ #
19
+ # @return [boolean]
20
+ def success
21
+ attributes.fetch(:success)
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
@@ -14,7 +14,7 @@ module LanguageServer
14
14
  #
15
15
  # The message type. See {@link MessageType}.
16
16
  #
17
- # @return [number]
17
+ # @return [MessageType]
18
18
  def type
19
19
  attributes.fetch(:type)
20
20
  end
@@ -0,0 +1,36 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Show message request client capabilities
6
+ #
7
+ class ShowMessageRequestClientCapabilities
8
+ def initialize(message_action_item: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:messageActionItem] = message_action_item if message_action_item
12
+
13
+ @attributes.freeze
14
+ end
15
+
16
+ #
17
+ # Capabilities specific to the `MessageActionItem` type.
18
+ #
19
+ # @return [{ additionalPropertiesSupport?: boolean; }]
20
+ def message_action_item
21
+ attributes.fetch(:messageActionItem)
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
@@ -15,7 +15,7 @@ module LanguageServer
15
15
  #
16
16
  # The message type. See {@link MessageType}
17
17
  #
18
- # @return [number]
18
+ # @return [MessageType]
19
19
  def type
20
20
  attributes.fetch(:type)
21
21
  end
@@ -18,7 +18,7 @@ module LanguageServer
18
18
  end
19
19
 
20
20
  #
21
- # One or more signatures. If no signaures are availabe the signature help
21
+ # One or more signatures. If no signatures are available the signature help
22
22
  # request should return `null`.
23
23
  #
24
24
  # @return [SignatureInformation[]]
@@ -28,8 +28,8 @@ module LanguageServer
28
28
 
29
29
  #
30
30
  # The active signature. If omitted or the value lies outside the
31
- # range of `signatures` the value defaults to zero or is ignore if
32
- # the `SignatureHelp` as no signatures.
31
+ # range of `signatures` the value defaults to zero or is ignored if
32
+ # the `SignatureHelp` has no signatures.
33
33
  #
34
34
  # Whenever possible implementors should make an active decision about
35
35
  # the active signature and shouldn't rely on a default value.
@@ -24,7 +24,7 @@ module LanguageServer
24
24
  # The client supports the following `SignatureInformation`
25
25
  # specific properties.
26
26
  #
27
- # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; }]
27
+ # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }]
28
28
  def signature_information
29
29
  attributes.fetch(:signatureInformation)
30
30
  end
@@ -2,7 +2,8 @@ module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
4
  #
5
- # Additional information about the context in which a signature help request was triggered.
5
+ # Additional information about the context in which a signature help request
6
+ # was triggered.
6
7
  #
7
8
  class SignatureHelpContext
8
9
  def initialize(trigger_kind:, trigger_character: nil, is_retrigger:, active_signature_help: nil)
@@ -19,7 +20,7 @@ module LanguageServer
19
20
  #
20
21
  # Action that caused signature help to be triggered.
21
22
  #
22
- # @return [CompletionTriggerKind]
23
+ # @return [SignatureHelpTriggerKind]
23
24
  def trigger_kind
24
25
  attributes.fetch(:triggerKind)
25
26
  end
@@ -27,7 +28,8 @@ module LanguageServer
27
28
  #
28
29
  # Character that caused signature help to be triggered.
29
30
  #
30
- # This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
31
+ # This is undefined when triggerKind !==
32
+ # SignatureHelpTriggerKind.TriggerCharacter
31
33
  #
32
34
  # @return [string]
33
35
  def trigger_character
@@ -37,8 +39,9 @@ module LanguageServer
37
39
  #
38
40
  # `true` if signature help was already showing when it was triggered.
39
41
  #
40
- # Retriggers occur when the signature help is already active and can be caused by actions such as
41
- # typing a trigger character, a cursor move, or document content changes.
42
+ # Retriggers occur when the signature help is already active and can be
43
+ # caused by actions such as typing a trigger character, a cursor move, or
44
+ # document content changes.
42
45
  #
43
46
  # @return [boolean]
44
47
  def is_retrigger
@@ -48,8 +51,8 @@ module LanguageServer
48
51
  #
49
52
  # The currently active `SignatureHelp`.
50
53
  #
51
- # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
52
- # the user navigating through available signatures.
54
+ # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field
55
+ # updated based on the user navigating through available signatures.
53
56
  #
54
57
  # @return [SignatureHelp]
55
58
  def active_signature_help
@@ -24,8 +24,9 @@ module LanguageServer
24
24
  #
25
25
  # List of characters that re-trigger signature help.
26
26
  #
27
- # These trigger characters are only active when signature help is already showing. All trigger characters
28
- # are also counted as re-trigger characters.
27
+ # These trigger characters are only active when signature help is already
28
+ # showing. All trigger characters are also counted as re-trigger
29
+ # characters.
29
30
  #
30
31
  # @return [string[]]
31
32
  def retrigger_characters
@@ -12,8 +12,9 @@ module LanguageServer
12
12
  end
13
13
 
14
14
  #
15
- # The signature help context. This is only available if the client specifies
16
- # to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
15
+ # The signature help context. This is only available if the client
16
+ # specifies to send this using the client capability
17
+ # `textDocument.signatureHelp.contextSupport === true`
17
18
  #
18
19
  # @return [SignatureHelpContext]
19
20
  def context