language_server-protocol 3.14.0.2 → 3.15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/language_server/protocol/constant.rb +8 -0
- data/lib/language_server/protocol/constant/code_action_kind.rb +12 -8
- data/lib/language_server/protocol/constant/completion_item_tag.rb +16 -0
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +24 -0
- data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +23 -0
- data/lib/language_server/protocol/constant/text_document_sync_kind.rb +1 -0
- data/lib/language_server/protocol/interface.rb +158 -8
- data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +13 -1
- data/lib/language_server/protocol/interface/client_capabilities.rb +11 -2
- data/lib/language_server/protocol/interface/code_action.rb +14 -1
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +52 -0
- data/lib/language_server/protocol/interface/code_action_context.rb +5 -1
- data/lib/language_server/protocol/interface/code_action_options.rb +3 -5
- data/lib/language_server/protocol/interface/code_action_params.rb +3 -2
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +2 -1
- data/lib/language_server/protocol/interface/code_lens_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/code_lens_options.rb +3 -5
- data/lib/language_server/protocol/interface/code_lens_params.rb +3 -2
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +3 -11
- data/lib/language_server/protocol/interface/color_presentation_params.rb +3 -2
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +59 -0
- data/lib/language_server/protocol/interface/completion_item.rb +16 -5
- data/lib/language_server/protocol/interface/completion_options.rb +33 -11
- data/lib/language_server/protocol/interface/completion_params.rb +3 -4
- data/lib/language_server/protocol/interface/completion_registration_options.rb +4 -27
- data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/declaration_options.rb +25 -0
- data/lib/language_server/protocol/interface/declaration_params.rb +25 -0
- data/lib/language_server/protocol/interface/{color_provider_options.rb → declaration_registration_options.rb} +3 -5
- data/lib/language_server/protocol/interface/definition_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/definition_options.rb +25 -0
- data/lib/language_server/protocol/interface/definition_params.rb +25 -0
- data/lib/language_server/protocol/interface/definition_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/diagnostic.rb +11 -2
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +1 -1
- 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 +10 -2
- 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 +25 -0
- data/lib/language_server/protocol/interface/document_color_params.rb +34 -0
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_formatting_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_formatting_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_highlight_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_highlight_params.rb +25 -0
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_link.rb +14 -1
- data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/document_link_options.rb +3 -5
- data/lib/language_server/protocol/interface/document_link_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +3 -11
- 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 +1 -17
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +2 -19
- 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 +25 -0
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_symbol.rb +96 -0
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +51 -0
- data/lib/language_server/protocol/interface/document_symbol_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_symbol_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/execute_command_options.rb +3 -5
- data/lib/language_server/protocol/interface/execute_command_params.rb +3 -2
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +3 -10
- data/lib/language_server/protocol/interface/folding_range.rb +1 -1
- data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +55 -0
- data/lib/language_server/protocol/interface/folding_range_options.rb +25 -0
- data/lib/language_server/protocol/interface/folding_range_params.rb +3 -2
- data/lib/language_server/protocol/interface/{folding_range_provider_options.rb → folding_range_registration_options.rb} +3 -5
- data/lib/language_server/protocol/interface/formatting_options.rb +28 -1
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +43 -0
- data/lib/language_server/protocol/interface/hover_options.rb +25 -0
- data/lib/language_server/protocol/interface/hover_params.rb +25 -0
- data/lib/language_server/protocol/interface/hover_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/implementation_options.rb +25 -0
- data/lib/language_server/protocol/interface/implementation_params.rb +25 -0
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/initialize_params.rb +12 -4
- data/lib/language_server/protocol/interface/initialize_result.rb +10 -1
- data/lib/language_server/protocol/interface/location_link.rb +7 -4
- data/lib/language_server/protocol/interface/notification_message.rb +1 -1
- data/lib/language_server/protocol/interface/partial_result_params.rb +34 -0
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +26 -0
- data/lib/language_server/protocol/interface/progress_params.rb +42 -0
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +53 -0
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +10 -1
- data/lib/language_server/protocol/interface/reference_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/reference_options.rb +25 -0
- data/lib/language_server/protocol/interface/reference_params.rb +3 -4
- data/lib/language_server/protocol/interface/reference_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +43 -0
- data/lib/language_server/protocol/interface/rename_options.rb +3 -5
- data/lib/language_server/protocol/interface/rename_params.rb +3 -20
- data/lib/language_server/protocol/interface/rename_registration_options.rb +3 -11
- data/lib/language_server/protocol/interface/request_message.rb +1 -1
- data/lib/language_server/protocol/interface/response_error.rb +2 -2
- data/lib/language_server/protocol/interface/response_message.rb +4 -4
- data/lib/language_server/protocol/interface/save_options.rb +0 -3
- data/lib/language_server/protocol/interface/selection_range.rb +42 -0
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +35 -0
- data/lib/language_server/protocol/interface/selection_range_options.rb +25 -0
- data/lib/language_server/protocol/interface/selection_range_params.rb +43 -0
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/server_capabilities.rb +66 -56
- data/lib/language_server/protocol/interface/signature_help.rb +8 -5
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +55 -0
- data/lib/language_server/protocol/interface/signature_help_context.rb +71 -0
- data/lib/language_server/protocol/interface/signature_help_options.rb +15 -5
- data/lib/language_server/protocol/interface/signature_help_params.rb +35 -0
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +4 -12
- data/lib/language_server/protocol/interface/symbol_information.rb +1 -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 +87 -87
- data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -0
- 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 -6
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/type_definition_options.rb +25 -0
- data/lib/language_server/protocol/interface/type_definition_params.rb +25 -0
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.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 +1 -1
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +53 -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 +42 -0
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +25 -0
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +5 -3
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +25 -0
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +83 -6
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +0 -55
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -104
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class CompletionParams <
|
|
5
|
-
def initialize(
|
|
4
|
+
class CompletionParams < PartialResultParams
|
|
5
|
+
def initialize(partial_result_token: nil, context: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
-
@attributes[:
|
|
9
|
-
@attributes[:position] = position
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
10
9
|
@attributes[:context] = context if context
|
|
11
10
|
|
|
12
11
|
@attributes.freeze
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class CompletionRegistrationOptions <
|
|
5
|
-
def initialize(
|
|
4
|
+
class CompletionRegistrationOptions < CompletionOptions
|
|
5
|
+
def initialize(work_done_progress: nil, trigger_characters: nil, all_commit_characters: nil, resolve_provider: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
-
@attributes[:
|
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
|
9
9
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
|
10
|
+
@attributes[:allCommitCharacters] = all_commit_characters if all_commit_characters
|
|
10
11
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
|
11
12
|
|
|
12
13
|
@attributes.freeze
|
|
13
14
|
end
|
|
14
15
|
|
|
15
|
-
#
|
|
16
|
-
# Most tools trigger completion request automatically without explicitly requesting
|
|
17
|
-
# it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
|
|
18
|
-
# starts to type an identifier. For example if the user types `c` in a JavaScript file
|
|
19
|
-
# code complete will automatically pop up present `console` besides others as a
|
|
20
|
-
# completion item. Characters that make up identifiers don't need to be listed here.
|
|
21
|
-
#
|
|
22
|
-
# If code complete should automatically be trigger on characters not being valid inside
|
|
23
|
-
# an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
|
|
24
|
-
#
|
|
25
|
-
# @return [string[]]
|
|
26
|
-
def trigger_characters
|
|
27
|
-
attributes.fetch(:triggerCharacters)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
#
|
|
31
|
-
# The server provides support to resolve additional
|
|
32
|
-
# information for a completion item.
|
|
33
|
-
#
|
|
34
|
-
# @return [boolean]
|
|
35
|
-
def resolve_provider
|
|
36
|
-
attributes.fetch(:resolveProvider)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
16
|
attr_reader :attributes
|
|
40
17
|
|
|
41
18
|
def to_hash
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DeclarationClientCapabilities
|
|
5
|
+
def initialize(dynamic_registration: nil, link_support: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
|
9
|
+
@attributes[:linkSupport] = link_support if link_support
|
|
10
|
+
|
|
11
|
+
@attributes.freeze
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
# Whether declaration supports dynamic registration. If this is set to `true`
|
|
16
|
+
# the client supports the new `DeclarationRegistrationOptions` return value
|
|
17
|
+
# for the corresponding server capability as well.
|
|
18
|
+
#
|
|
19
|
+
# @return [boolean]
|
|
20
|
+
def dynamic_registration
|
|
21
|
+
attributes.fetch(:dynamicRegistration)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# The client supports additional metadata in the form of declaration links.
|
|
26
|
+
#
|
|
27
|
+
# @return [boolean]
|
|
28
|
+
def link_support
|
|
29
|
+
attributes.fetch(:linkSupport)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
attr_reader :attributes
|
|
33
|
+
|
|
34
|
+
def to_hash
|
|
35
|
+
attributes
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def to_json(*args)
|
|
39
|
+
to_hash.to_json(*args)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DeclarationOptions < WorkDoneProgressOptions
|
|
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
|
+
attr_reader :attributes
|
|
14
|
+
|
|
15
|
+
def to_hash
|
|
16
|
+
attributes
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_json(*args)
|
|
20
|
+
to_hash.to_json(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DeclarationParams < PartialResultParams
|
|
5
|
+
def initialize(partial_result_token: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
9
|
+
|
|
10
|
+
@attributes.freeze
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attr_reader :attributes
|
|
14
|
+
|
|
15
|
+
def to_hash
|
|
16
|
+
attributes
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_json(*args)
|
|
20
|
+
to_hash.to_json(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
#
|
|
7
|
-
class ColorProviderOptions
|
|
8
|
-
def initialize()
|
|
4
|
+
class DeclarationRegistrationOptions < StaticRegistrationOptions
|
|
5
|
+
def initialize(id: nil)
|
|
9
6
|
@attributes = {}
|
|
10
7
|
|
|
8
|
+
@attributes[:id] = id if id
|
|
11
9
|
|
|
12
10
|
@attributes.freeze
|
|
13
11
|
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DefinitionClientCapabilities
|
|
5
|
+
def initialize(dynamic_registration: nil, link_support: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
|
9
|
+
@attributes[:linkSupport] = link_support if link_support
|
|
10
|
+
|
|
11
|
+
@attributes.freeze
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
# Whether definition supports dynamic registration.
|
|
16
|
+
#
|
|
17
|
+
# @return [boolean]
|
|
18
|
+
def dynamic_registration
|
|
19
|
+
attributes.fetch(:dynamicRegistration)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
#
|
|
23
|
+
# The client supports additional metadata in the form of definition links.
|
|
24
|
+
#
|
|
25
|
+
# @return [boolean]
|
|
26
|
+
def link_support
|
|
27
|
+
attributes.fetch(:linkSupport)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :attributes
|
|
31
|
+
|
|
32
|
+
def to_hash
|
|
33
|
+
attributes
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_json(*args)
|
|
37
|
+
to_hash.to_json(*args)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DefinitionOptions < WorkDoneProgressOptions
|
|
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
|
+
attr_reader :attributes
|
|
14
|
+
|
|
15
|
+
def to_hash
|
|
16
|
+
attributes
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_json(*args)
|
|
20
|
+
to_hash.to_json(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DefinitionParams < PartialResultParams
|
|
5
|
+
def initialize(partial_result_token: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
9
|
+
|
|
10
|
+
@attributes.freeze
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attr_reader :attributes
|
|
14
|
+
|
|
15
|
+
def to_hash
|
|
16
|
+
attributes
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_json(*args)
|
|
20
|
+
to_hash.to_json(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class DefinitionRegistrationOptions < DefinitionOptions
|
|
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
|
+
attr_reader :attributes
|
|
14
|
+
|
|
15
|
+
def to_hash
|
|
16
|
+
attributes
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_json(*args)
|
|
20
|
+
to_hash.to_json(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -2,7 +2,7 @@ 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, source: nil, message:, tags: nil, related_information: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
8
|
@attributes[:range] = range
|
|
@@ -10,6 +10,7 @@ module LanguageServer
|
|
|
10
10
|
@attributes[:code] = code if code
|
|
11
11
|
@attributes[:source] = source if source
|
|
12
12
|
@attributes[:message] = message
|
|
13
|
+
@attributes[:tags] = tags if tags
|
|
13
14
|
@attributes[:relatedInformation] = related_information if related_information
|
|
14
15
|
|
|
15
16
|
@attributes.freeze
|
|
@@ -27,7 +28,7 @@ module LanguageServer
|
|
|
27
28
|
# The diagnostic's severity. Can be omitted. If omitted it is up to the
|
|
28
29
|
# client to interpret diagnostics as error, warning, info or hint.
|
|
29
30
|
#
|
|
30
|
-
# @return [
|
|
31
|
+
# @return [DiagnosticSeverity]
|
|
31
32
|
def severity
|
|
32
33
|
attributes.fetch(:severity)
|
|
33
34
|
end
|
|
@@ -57,6 +58,14 @@ module LanguageServer
|
|
|
57
58
|
attributes.fetch(:message)
|
|
58
59
|
end
|
|
59
60
|
|
|
61
|
+
#
|
|
62
|
+
# Additional metadata about the diagnostic.
|
|
63
|
+
#
|
|
64
|
+
# @return [DiagnosticTag[]]
|
|
65
|
+
def tags
|
|
66
|
+
attributes.fetch(:tags)
|
|
67
|
+
end
|
|
68
|
+
|
|
60
69
|
#
|
|
61
70
|
# An array of related diagnostic information, e.g. when symbol-names within
|
|
62
71
|
# a scope collide all definitions can be marked via this property.
|
|
@@ -3,7 +3,7 @@ module LanguageServer
|
|
|
3
3
|
module Interface
|
|
4
4
|
#
|
|
5
5
|
# Represents a related message and source code location for a diagnostic. This should be
|
|
6
|
-
# used to point to code locations that cause or related to a diagnostics, e.g when duplicating
|
|
6
|
+
# used to point to code locations that cause or are related to a diagnostics, e.g when duplicating
|
|
7
7
|
# a symbol in a scope.
|
|
8
8
|
#
|
|
9
9
|
class DiagnosticRelatedInformation
|
|
@@ -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
|
|
@@ -23,8 +23,16 @@ module LanguageServer
|
|
|
23
23
|
|
|
24
24
|
#
|
|
25
25
|
# The actual content changes. The content changes describe single state changes
|
|
26
|
-
# to the document. So if there are two content changes c1
|
|
27
|
-
# in state S then c1
|
|
26
|
+
# to the document. So if there are two content changes c1 (at array index 0) and
|
|
27
|
+
# c2 (at array index 1) for a document in state S then c1 moves the document from
|
|
28
|
+
# S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
|
|
29
|
+
# on the state S'.
|
|
30
|
+
#
|
|
31
|
+
# To mirror the content of a document using change events use the following approach:
|
|
32
|
+
# - start with the same initial content
|
|
33
|
+
# - apply the 'textDocument/didChange' notifications in the order you recevie them.
|
|
34
|
+
# - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
|
|
35
|
+
# you receive them.
|
|
28
36
|
#
|
|
29
37
|
# @return [TextDocumentContentChangeEvent[]]
|
|
30
38
|
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. Please note
|
|
15
|
+
# that the current protocol doesn't support static configuration for file changes
|
|
16
|
+
# 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:)
|