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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/language_server/protocol/constant.rb +10 -0
- data/lib/language_server/protocol/constant/code_action_kind.rb +6 -4
- data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -2
- data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -2
- data/lib/language_server/protocol/constant/error_codes.rb +26 -3
- data/lib/language_server/protocol/constant/failure_handling_kind.rb +6 -5
- data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +20 -0
- data/lib/language_server/protocol/constant/initialize_error.rb +2 -1
- data/lib/language_server/protocol/constant/insert_text_mode.rb +30 -0
- data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +13 -0
- data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -1
- data/lib/language_server/protocol/constant/symbol_tag.rb +15 -0
- data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
- data/lib/language_server/protocol/constant/text_document_sync_kind.rb +2 -2
- data/lib/language_server/protocol/constant/token_format.rb +9 -0
- data/lib/language_server/protocol/interface.rb +112 -0
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +38 -0
- data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +15 -4
- data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +43 -0
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +31 -0
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +25 -0
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +43 -0
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +31 -0
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +25 -0
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
- data/lib/language_server/protocol/interface/client_capabilities.rb +12 -3
- data/lib/language_server/protocol/interface/code_action.rb +43 -8
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +44 -1
- data/lib/language_server/protocol/interface/code_action_context.rb +7 -6
- data/lib/language_server/protocol/interface/code_action_options.rb +13 -3
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +2 -1
- data/lib/language_server/protocol/interface/code_description.rb +36 -0
- data/lib/language_server/protocol/interface/code_lens.rb +5 -3
- data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +39 -0
- data/lib/language_server/protocol/interface/color_presentation.rb +7 -6
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/completion_context.rb +5 -3
- data/lib/language_server/protocol/interface/completion_item.rb +60 -29
- data/lib/language_server/protocol/interface/completion_list.rb +2 -2
- data/lib/language_server/protocol/interface/completion_options.rb +15 -12
- data/lib/language_server/protocol/interface/completion_params.rb +2 -1
- data/lib/language_server/protocol/interface/create_file.rb +10 -1
- data/lib/language_server/protocol/interface/create_files_params.rb +37 -0
- data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/delete_file.rb +10 -1
- data/lib/language_server/protocol/interface/delete_files_params.rb +37 -0
- data/lib/language_server/protocol/interface/diagnostic.rb +21 -1
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
- data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -9
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/document_filter.rb +7 -3
- data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
- data/lib/language_server/protocol/interface/document_link.rb +6 -5
- data/lib/language_server/protocol/interface/document_symbol.rb +23 -11
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +24 -2
- data/lib/language_server/protocol/interface/document_symbol_options.rb +11 -1
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +2 -1
- data/lib/language_server/protocol/interface/file_create.rb +36 -0
- data/lib/language_server/protocol/interface/file_delete.rb +36 -0
- data/lib/language_server/protocol/interface/file_operation_filter.rb +46 -0
- data/lib/language_server/protocol/interface/file_operation_pattern.rb +67 -0
- data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +36 -0
- data/lib/language_server/protocol/interface/file_operation_registration_options.rb +36 -0
- data/lib/language_server/protocol/interface/file_rename.rb +45 -0
- data/lib/language_server/protocol/interface/file_system_watcher.rb +7 -3
- data/lib/language_server/protocol/interface/folding_range.rb +17 -8
- data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +10 -7
- data/lib/language_server/protocol/interface/hover.rb +1 -1
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +3 -2
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/initialize_params.rb +20 -5
- data/lib/language_server/protocol/interface/insert_replace_edit.rb +54 -0
- data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/linked_editing_range_options.rb +25 -0
- data/lib/language_server/protocol/interface/linked_editing_range_params.rb +25 -0
- data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
- data/lib/language_server/protocol/interface/location_link.rb +9 -7
- data/lib/language_server/protocol/interface/log_message_params.rb +1 -1
- data/lib/language_server/protocol/interface/log_trace_params.rb +43 -0
- data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +45 -0
- data/lib/language_server/protocol/interface/markup_content.rb +9 -7
- data/lib/language_server/protocol/interface/moniker.rb +64 -0
- data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/moniker_options.rb +25 -0
- data/lib/language_server/protocol/interface/moniker_params.rb +25 -0
- data/lib/language_server/protocol/interface/moniker_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +42 -0
- data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
- data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
- data/lib/language_server/protocol/interface/position.rb +5 -5
- data/lib/language_server/protocol/interface/progress_params.rb +1 -1
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +21 -1
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +2 -1
- data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +27 -1
- data/lib/language_server/protocol/interface/rename_file.rb +10 -1
- data/lib/language_server/protocol/interface/rename_files_params.rb +38 -0
- data/lib/language_server/protocol/interface/selection_range.rb +2 -1
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -3
- data/lib/language_server/protocol/interface/semantic_tokens.rb +45 -0
- data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +97 -0
- data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +40 -0
- data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +44 -0
- data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +30 -0
- data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +51 -0
- data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +42 -0
- data/lib/language_server/protocol/interface/semantic_tokens_options.rb +53 -0
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +34 -0
- data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +30 -0
- data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +43 -0
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
- data/lib/language_server/protocol/interface/server_capabilities.rb +47 -9
- data/lib/language_server/protocol/interface/set_trace_params.rb +33 -0
- data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +37 -0
- data/lib/language_server/protocol/interface/show_document_params.rb +71 -0
- data/lib/language_server/protocol/interface/show_document_result.rb +36 -0
- data/lib/language_server/protocol/interface/show_message_params.rb +1 -1
- data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/show_message_request_params.rb +1 -1
- data/lib/language_server/protocol/interface/signature_help.rb +3 -3
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/signature_help_context.rb +10 -7
- data/lib/language_server/protocol/interface/signature_help_options.rb +3 -2
- data/lib/language_server/protocol/interface/signature_help_params.rb +3 -2
- data/lib/language_server/protocol/interface/signature_information.rb +12 -1
- data/lib/language_server/protocol/interface/symbol_information.rb +10 -1
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +1 -1
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +39 -2
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
- data/lib/language_server/protocol/interface/text_document_sync_options.rb +13 -15
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +3 -7
- data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_begin.rb +3 -3
- data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_report.rb +5 -5
- data/lib/language_server/protocol/interface/workspace_edit.rb +24 -7
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +23 -1
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +13 -2
- data/lib/language_server/protocol/version.rb +1 -1
- 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
|
39
|
-
# for backwards compatibility the
|
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 [
|
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
|
128
|
-
# valid if the client signals code action literal support via the
|
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
|
@@ -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
|
@@ -18,7 +18,7 @@ module LanguageServer
|
|
18
18
|
end
|
19
19
|
|
20
20
|
#
|
21
|
-
# One or more signatures. If no
|
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
|
32
|
-
# the `SignatureHelp`
|
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
|
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 [
|
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
|
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
|
41
|
-
# typing a trigger character, a cursor move, or
|
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
|
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
|
28
|
-
# are also counted as re-trigger
|
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
|
16
|
-
# to send this using the client capability
|
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
|