language_server-protocol 3.14.0.0 → 3.15.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- 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 -6
- 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 +3 -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 -10
- 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 -2
- data/lib/language_server/protocol/interface/completion_registration_options.rb +4 -26
- 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/{folding_range_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 -10
- 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 -18
- 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/{color_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 +2 -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 -2
- 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 -10
- data/lib/language_server/protocol/interface/request_message.rb +2 -1
- data/lib/language_server/protocol/interface/response_error.rb +2 -2
- data/lib/language_server/protocol/interface/response_message.rb +5 -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 -11
- data/lib/language_server/protocol/interface/symbol_information.rb +1 -1
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +2 -1
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +87 -87
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +8 -4
- data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -0
- data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +1 -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 +2 -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/transport.rb +1 -0
- data/lib/language_server/protocol/transport/io.rb +2 -0
- data/lib/language_server/protocol/transport/io/reader.rb +47 -0
- data/lib/language_server/protocol/transport/io/writer.rb +34 -0
- data/lib/language_server/protocol/transport/stdio/reader.rb +3 -29
- data/lib/language_server/protocol/transport/stdio/writer.rb +3 -18
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +92 -31
- data/.gitignore +0 -10
- data/.travis.yml +0 -5
- data/CHANGELOG.md +0 -21
- data/CODE_OF_CONDUCT.md +0 -74
- data/Dockerfile-node.development +0 -6
- data/Dockerfile.development +0 -24
- data/Gemfile +0 -6
- data/Rakefile +0 -10
- data/bin/console +0 -14
- data/bin/generate_files +0 -5
- data/bin/m +0 -17
- data/bin/setup +0 -6
- data/circle.yml +0 -46
- data/docker-compose.ci.yml +0 -18
- data/docker-compose.override.yml +0 -19
- data/docker-compose.yml +0 -45
- data/language_server-protocol.gemspec +0 -31
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -104
- data/package.json +0 -10
- data/scripts/generateFiles.ts +0 -320
- data/yarn.lock +0 -293
@@ -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:)
|
@@ -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,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorOptions < 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,34 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorParams < PartialResultParams
|
5
|
+
def initialize(partial_result_token: nil, text_document:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
9
|
+
@attributes[:textDocument] = text_document
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# The text document.
|
16
|
+
#
|
17
|
+
# @return [TextDocumentIdentifier]
|
18
|
+
def text_document
|
19
|
+
attributes.fetch(:textDocument)
|
20
|
+
end
|
21
|
+
|
22
|
+
attr_reader :attributes
|
23
|
+
|
24
|
+
def to_hash
|
25
|
+
attributes
|
26
|
+
end
|
27
|
+
|
28
|
+
def to_json(*args)
|
29
|
+
to_hash.to_json(*args)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentColorRegistrationOptions < 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
|
+
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,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,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentFormattingOptions < 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
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentFormattingParams
|
5
|
-
def initialize(text_document:, options:)
|
4
|
+
class DocumentFormattingParams < WorkDoneProgressParams
|
5
|
+
def initialize(work_done_token: nil, text_document:, options:)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
8
9
|
@attributes[:textDocument] = text_document
|
9
10
|
@attributes[:options] = options
|
10
11
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentFormattingRegistrationOptions < 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
|
+
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,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentHighlightClientCapabilities
|
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 highlight 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,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentHighlightOptions < 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 DocumentHighlightParams < 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 DocumentHighlightRegistrationOptions < DocumentHighlightOptions
|
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
|
@@ -6,11 +6,12 @@ module LanguageServer
|
|
6
6
|
# text document or a web site.
|
7
7
|
#
|
8
8
|
class DocumentLink
|
9
|
-
def initialize(range:, target: nil, data: nil)
|
9
|
+
def initialize(range:, target: nil, tooltip: nil, data: nil)
|
10
10
|
@attributes = {}
|
11
11
|
|
12
12
|
@attributes[:range] = range
|
13
13
|
@attributes[:target] = target if target
|
14
|
+
@attributes[:tooltip] = tooltip if tooltip
|
14
15
|
@attributes[:data] = data if data
|
15
16
|
|
16
17
|
@attributes.freeze
|
@@ -32,6 +33,18 @@ module LanguageServer
|
|
32
33
|
attributes.fetch(:target)
|
33
34
|
end
|
34
35
|
|
36
|
+
#
|
37
|
+
# The tooltip text when you hover over this link.
|
38
|
+
#
|
39
|
+
# If a tooltip is provided, is will be displayed in a string that includes instructions on how to
|
40
|
+
# trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
|
41
|
+
# user settings, and localization.
|
42
|
+
#
|
43
|
+
# @return [string]
|
44
|
+
def tooltip
|
45
|
+
attributes.fetch(:tooltip)
|
46
|
+
end
|
47
|
+
|
35
48
|
#
|
36
49
|
# A data entry field that is preserved on a document link between a
|
37
50
|
# DocumentLinkRequest and a DocumentLinkResolveRequest.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentLinkClientCapabilities
|
5
|
+
def initialize(dynamic_registration: nil, tooltip_support: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
|
+
@attributes[:tooltipSupport] = tooltip_support if tooltip_support
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# Whether document link supports dynamic registration.
|
16
|
+
#
|
17
|
+
# @return [boolean]
|
18
|
+
def dynamic_registration
|
19
|
+
attributes.fetch(:dynamicRegistration)
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# Whether the client supports the `tooltip` property on `DocumentLink`.
|
24
|
+
#
|
25
|
+
# @return [boolean]
|
26
|
+
def tooltip_support
|
27
|
+
attributes.fetch(:tooltipSupport)
|
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
|