language_server-protocol 3.14.0.2 → 3.16.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/language_server/protocol/constant.rb +18 -0
- data/lib/language_server/protocol/constant/code_action_kind.rb +17 -11
- data/lib/language_server/protocol/constant/completion_item_tag.rb +16 -0
- data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +24 -0
- 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 +24 -0
- 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 -1
- data/lib/language_server/protocol/constant/token_format.rb +9 -0
- data/lib/language_server/protocol/interface.rb +270 -6
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +56 -0
- data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +24 -1
- 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 +49 -0
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +30 -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 +49 -0
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +51 -0
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
- data/lib/language_server/protocol/interface/client_capabilities.rb +20 -2
- data/lib/language_server/protocol/interface/code_action.rb +52 -4
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +95 -0
- data/lib/language_server/protocol/interface/code_action_context.rb +8 -3
- data/lib/language_server/protocol/interface/code_action_options.rb +19 -6
- data/lib/language_server/protocol/interface/code_action_params.rb +20 -1
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +39 -2
- 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_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/code_lens_options.rb +7 -4
- data/lib/language_server/protocol/interface/code_lens_params.rb +20 -1
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +17 -2
- 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/color_presentation_params.rb +20 -1
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +59 -0
- data/lib/language_server/protocol/interface/completion_context.rb +5 -3
- data/lib/language_server/protocol/interface/completion_item.rb +71 -29
- data/lib/language_server/protocol/interface/completion_list.rb +2 -2
- data/lib/language_server/protocol/interface/completion_options.rb +39 -9
- data/lib/language_server/protocol/interface/completion_params.rb +39 -3
- data/lib/language_server/protocol/interface/completion_registration_options.rb +41 -9
- 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 +44 -0
- data/lib/language_server/protocol/interface/declaration_options.rb +30 -0
- data/lib/language_server/protocol/interface/declaration_params.rb +61 -0
- data/lib/language_server/protocol/interface/declaration_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/definition_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/definition_options.rb +30 -0
- data/lib/language_server/protocol/interface/definition_params.rb +61 -0
- data/lib/language_server/protocol/interface/definition_registration_options.rb +40 -0
- 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 +31 -2
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
- data/lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/did_change_text_document_params.rb +13 -3
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +35 -0
- data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_color_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_color_options.rb +30 -0
- data/lib/language_server/protocol/interface/document_color_params.rb +52 -0
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/document_filter.rb +7 -3
- data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_formatting_options.rb +30 -0
- data/lib/language_server/protocol/interface/document_formatting_params.rb +10 -1
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
- data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_highlight_options.rb +30 -0
- data/lib/language_server/protocol/interface/document_highlight_params.rb +61 -0
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/document_link.rb +17 -3
- data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/document_link_options.rb +7 -4
- data/lib/language_server/protocol/interface/document_link_params.rb +20 -1
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +0 -3
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +2 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +10 -1
- data/lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_range_formatting_options.rb +30 -0
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +10 -1
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/document_symbol.rb +108 -0
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +73 -0
- data/lib/language_server/protocol/interface/document_symbol_options.rb +40 -0
- data/lib/language_server/protocol/interface/document_symbol_params.rb +20 -1
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/execute_command_options.rb +7 -4
- data/lib/language_server/protocol/interface/execute_command_params.rb +10 -1
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +7 -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 +58 -0
- data/lib/language_server/protocol/interface/folding_range_options.rb +30 -0
- data/lib/language_server/protocol/interface/folding_range_params.rb +20 -1
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/formatting_options.rb +28 -1
- data/lib/language_server/protocol/interface/hover.rb +1 -1
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/hover_options.rb +30 -0
- data/lib/language_server/protocol/interface/hover_params.rb +51 -0
- data/lib/language_server/protocol/interface/hover_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/implementation_options.rb +30 -0
- data/lib/language_server/protocol/interface/implementation_params.rb +61 -0
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/initialize_params.rb +38 -7
- data/lib/language_server/protocol/interface/initialize_result.rb +10 -1
- 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 +30 -0
- data/lib/language_server/protocol/interface/linked_editing_range_params.rb +51 -0
- data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
- data/lib/language_server/protocol/interface/location_link.rb +11 -6
- 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 +30 -0
- data/lib/language_server/protocol/interface/moniker_params.rb +61 -0
- data/lib/language_server/protocol/interface/moniker_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/notification_message.rb +7 -2
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +50 -0
- data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
- data/lib/language_server/protocol/interface/partial_result_params.rb +34 -0
- data/lib/language_server/protocol/interface/position.rb +5 -5
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +42 -0
- data/lib/language_server/protocol/interface/progress_params.rb +42 -0
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +73 -0
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +11 -1
- data/lib/language_server/protocol/interface/reference_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/reference_options.rb +30 -0
- data/lib/language_server/protocol/interface/reference_params.rb +37 -2
- data/lib/language_server/protocol/interface/reference_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +69 -0
- 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/rename_options.rb +7 -4
- data/lib/language_server/protocol/interface/rename_params.rb +12 -3
- data/lib/language_server/protocol/interface/rename_registration_options.rb +18 -3
- data/lib/language_server/protocol/interface/request_message.rb +7 -2
- data/lib/language_server/protocol/interface/response_error.rb +2 -2
- data/lib/language_server/protocol/interface/response_message.rb +10 -5
- data/lib/language_server/protocol/interface/save_options.rb +0 -3
- data/lib/language_server/protocol/interface/selection_range.rb +43 -0
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/selection_range_options.rb +30 -0
- data/lib/language_server/protocol/interface/selection_range_params.rb +61 -0
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +50 -0
- 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 +62 -0
- data/lib/language_server/protocol/interface/{folding_range_provider_options.rb → semantic_tokens_delta_partial_result.rb} +8 -5
- 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 +58 -0
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +52 -0
- data/lib/language_server/protocol/interface/{color_provider_options.rb → semantic_tokens_partial_result.rb} +8 -5
- data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +61 -0
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +78 -0
- data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
- data/lib/language_server/protocol/interface/server_capabilities.rb +108 -60
- 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 +7 -4
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +55 -0
- data/lib/language_server/protocol/interface/signature_help_context.rb +74 -0
- data/lib/language_server/protocol/interface/signature_help_options.rb +20 -4
- data/lib/language_server/protocol/interface/signature_help_params.rb +62 -0
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +30 -2
- data/lib/language_server/protocol/interface/signature_information.rb +12 -1
- data/lib/language_server/protocol/interface/symbol_information.rb +11 -2
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +11 -2
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +123 -86
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +10 -6
- data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_registration_options.rb +6 -3
- data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +10 -1
- data/lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb +62 -0
- data/lib/language_server/protocol/interface/text_document_sync_options.rb +14 -8
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/type_definition_options.rb +30 -0
- data/lib/language_server/protocol/interface/type_definition_params.rb +61 -0
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +12 -8
- 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 +80 -0
- data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +33 -0
- data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +33 -0
- data/lib/language_server/protocol/interface/work_done_progress_end.rb +40 -0
- data/lib/language_server/protocol/interface/work_done_progress_options.rb +30 -0
- data/lib/language_server/protocol/interface/work_done_progress_params.rb +33 -0
- data/lib/language_server/protocol/interface/work_done_progress_report.rb +70 -0
- data/lib/language_server/protocol/interface/workspace_edit.rb +25 -8
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +75 -0
- data/lib/language_server/protocol/interface/workspace_folder.rb +2 -2
- data/lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb +48 -0
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +53 -0
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +30 -0
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +22 -2
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +30 -0
- data/lib/language_server/protocol/transport/io/reader.rb +1 -1
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +154 -15
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -104
@@ -2,15 +2,18 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class Diagnostic
|
5
|
-
def initialize(range:, severity: nil, code: nil, source: nil, message:, related_information: nil)
|
5
|
+
def initialize(range:, severity: nil, code: nil, code_description: nil, source: nil, message:, tags: nil, related_information: nil, data: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:range] = range
|
9
9
|
@attributes[:severity] = severity if severity
|
10
10
|
@attributes[:code] = code if code
|
11
|
+
@attributes[:codeDescription] = code_description if code_description
|
11
12
|
@attributes[:source] = source if source
|
12
13
|
@attributes[:message] = message
|
14
|
+
@attributes[:tags] = tags if tags
|
13
15
|
@attributes[:relatedInformation] = related_information if related_information
|
16
|
+
@attributes[:data] = data if data
|
14
17
|
|
15
18
|
@attributes.freeze
|
16
19
|
end
|
@@ -27,7 +30,7 @@ module LanguageServer
|
|
27
30
|
# The diagnostic's severity. Can be omitted. If omitted it is up to the
|
28
31
|
# client to interpret diagnostics as error, warning, info or hint.
|
29
32
|
#
|
30
|
-
# @return [
|
33
|
+
# @return [DiagnosticSeverity]
|
31
34
|
def severity
|
32
35
|
attributes.fetch(:severity)
|
33
36
|
end
|
@@ -40,6 +43,14 @@ module LanguageServer
|
|
40
43
|
attributes.fetch(:code)
|
41
44
|
end
|
42
45
|
|
46
|
+
#
|
47
|
+
# An optional property to describe the error code.
|
48
|
+
#
|
49
|
+
# @return [CodeDescription]
|
50
|
+
def code_description
|
51
|
+
attributes.fetch(:codeDescription)
|
52
|
+
end
|
53
|
+
|
43
54
|
#
|
44
55
|
# A human-readable string describing the source of this
|
45
56
|
# diagnostic, e.g. 'typescript' or 'super lint'.
|
@@ -57,6 +68,14 @@ module LanguageServer
|
|
57
68
|
attributes.fetch(:message)
|
58
69
|
end
|
59
70
|
|
71
|
+
#
|
72
|
+
# Additional metadata about the diagnostic.
|
73
|
+
#
|
74
|
+
# @return [DiagnosticTag[]]
|
75
|
+
def tags
|
76
|
+
attributes.fetch(:tags)
|
77
|
+
end
|
78
|
+
|
60
79
|
#
|
61
80
|
# An array of related diagnostic information, e.g. when symbol-names within
|
62
81
|
# a scope collide all definitions can be marked via this property.
|
@@ -66,6 +85,16 @@ module LanguageServer
|
|
66
85
|
attributes.fetch(:relatedInformation)
|
67
86
|
end
|
68
87
|
|
88
|
+
#
|
89
|
+
# A data entry field that is preserved between a
|
90
|
+
# `textDocument/publishDiagnostics` notification and
|
91
|
+
# `textDocument/codeAction` request.
|
92
|
+
#
|
93
|
+
# @return [unknown]
|
94
|
+
def data
|
95
|
+
attributes.fetch(:data)
|
96
|
+
end
|
97
|
+
|
69
98
|
attr_reader :attributes
|
70
99
|
|
71
100
|
def to_hash
|
@@ -2,9 +2,9 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# Represents a related message and source code location for a diagnostic.
|
6
|
-
# used to point to code locations that cause or related to
|
7
|
-
# a symbol in a scope.
|
5
|
+
# Represents a related message and source code location for a diagnostic.
|
6
|
+
# This should be used to point to code locations that cause or are related to
|
7
|
+
# a diagnostics, e.g when duplicating a symbol in a scope.
|
8
8
|
#
|
9
9
|
class DiagnosticRelatedInformation
|
10
10
|
def initialize(location:, message:)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DidChangeConfigurationClientCapabilities
|
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
|
+
# Did change configuration notification supports dynamic registration.
|
15
|
+
#
|
16
|
+
# @return [boolean]
|
17
|
+
def dynamic_registration
|
18
|
+
attributes.fetch(:dynamicRegistration)
|
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
|
@@ -22,9 +22,19 @@ module LanguageServer
|
|
22
22
|
end
|
23
23
|
|
24
24
|
#
|
25
|
-
# The actual content changes. The content changes describe single state
|
26
|
-
# to the document. So if there are two content changes c1
|
27
|
-
#
|
25
|
+
# The actual content changes. The content changes describe single state
|
26
|
+
# changes to the document. So if there are two content changes c1 (at
|
27
|
+
# array index 0) and c2 (at array index 1) for a document in state S then
|
28
|
+
# c1 moves the document from S to S' and c2 from S' to S''. So c1 is
|
29
|
+
# computed on the state S and c2 is computed on the state S'.
|
30
|
+
#
|
31
|
+
# To mirror the content of a document using change events use the following
|
32
|
+
# approach:
|
33
|
+
# - start with the same initial content
|
34
|
+
# - apply the 'textDocument/didChange' notifications in the order you
|
35
|
+
# receive them.
|
36
|
+
# - apply the `TextDocumentContentChangeEvent`s in a single notification
|
37
|
+
# in the order you receive them.
|
28
38
|
#
|
29
39
|
# @return [TextDocumentContentChangeEvent[]]
|
30
40
|
def content_changes
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DidChangeWatchedFilesClientCapabilities
|
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
|
+
# Did change watched files notification supports dynamic registration.
|
15
|
+
# Please note that the current protocol doesn't support static
|
16
|
+
# configuration for file changes from the server side.
|
17
|
+
#
|
18
|
+
# @return [boolean]
|
19
|
+
def dynamic_registration
|
20
|
+
attributes.fetch(:dynamicRegistration)
|
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
|
data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb
CHANGED
@@ -2,7 +2,7 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# Describe options to be used when registering for
|
5
|
+
# Describe options to be used when registering for file system change events.
|
6
6
|
#
|
7
7
|
class DidChangeWatchedFilesRegistrationOptions
|
8
8
|
def initialize(watchers:)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorClientCapabilities
|
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 document color supports dynamic registration.
|
15
|
+
#
|
16
|
+
# @return [boolean]
|
17
|
+
def dynamic_registration
|
18
|
+
attributes.fetch(:dynamicRegistration)
|
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,30 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorOptions
|
5
|
+
def initialize(work_done_progress: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [boolean]
|
14
|
+
def work_done_progress
|
15
|
+
attributes.fetch(:workDoneProgress)
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_reader :attributes
|
19
|
+
|
20
|
+
def to_hash
|
21
|
+
attributes
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_json(*args)
|
25
|
+
to_hash.to_json(*args)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorParams
|
5
|
+
def initialize(work_done_token: nil, partial_result_token: nil, text_document:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
10
|
+
@attributes[:textDocument] = text_document
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
14
|
+
|
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
|
+
#
|
24
|
+
# An optional token that a server can use to report partial results (e.g.
|
25
|
+
# streaming) to the client.
|
26
|
+
#
|
27
|
+
# @return [ProgressToken]
|
28
|
+
def partial_result_token
|
29
|
+
attributes.fetch(:partialResultToken)
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# The text document.
|
34
|
+
#
|
35
|
+
# @return [TextDocumentIdentifier]
|
36
|
+
def text_document
|
37
|
+
attributes.fetch(:textDocument)
|
38
|
+
end
|
39
|
+
|
40
|
+
attr_reader :attributes
|
41
|
+
|
42
|
+
def to_hash
|
43
|
+
attributes
|
44
|
+
end
|
45
|
+
|
46
|
+
def to_json(*args)
|
47
|
+
to_hash.to_json(*args)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorRegistrationOptions
|
5
|
+
def initialize(document_selector:, id: nil, work_done_progress: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:documentSelector] = document_selector
|
9
|
+
@attributes[:id] = id if id
|
10
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
14
|
+
|
15
|
+
#
|
16
|
+
# A document selector to identify the scope of the registration. If set to
|
17
|
+
# null the document selector provided on the client side will be used.
|
18
|
+
#
|
19
|
+
# @return [DocumentSelector]
|
20
|
+
def document_selector
|
21
|
+
attributes.fetch(:documentSelector)
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# The id used to register the request. The id can be used to deregister
|
26
|
+
# the request again. See also Registration#id.
|
27
|
+
#
|
28
|
+
# @return [string]
|
29
|
+
def id
|
30
|
+
attributes.fetch(:id)
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [boolean]
|
34
|
+
def work_done_progress
|
35
|
+
attributes.fetch(:workDoneProgress)
|
36
|
+
end
|
37
|
+
|
38
|
+
attr_reader :attributes
|
39
|
+
|
40
|
+
def to_hash
|
41
|
+
attributes
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_json(*args)
|
45
|
+
to_hash.to_json(*args)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -35,9 +35,13 @@ module LanguageServer
|
|
35
35
|
# - `*` to match one or more characters in a path segment
|
36
36
|
# - `?` to match on one character in a path segment
|
37
37
|
# - `**` to match any number of path segments, including none
|
38
|
-
# - `{}` to group
|
39
|
-
#
|
40
|
-
# - `[
|
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`)
|
41
45
|
#
|
42
46
|
# @return [string]
|
43
47
|
def pattern
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentFormattingClientCapabilities
|
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 formatting supports dynamic registration.
|
15
|
+
#
|
16
|
+
# @return [boolean]
|
17
|
+
def dynamic_registration
|
18
|
+
attributes.fetch(:dynamicRegistration)
|
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,30 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentFormattingOptions
|
5
|
+
def initialize(work_done_progress: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [boolean]
|
14
|
+
def work_done_progress
|
15
|
+
attributes.fetch(:workDoneProgress)
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_reader :attributes
|
19
|
+
|
20
|
+
def to_hash
|
21
|
+
attributes
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_json(*args)
|
25
|
+
to_hash.to_json(*args)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|