language_server-protocol 3.7.0.0 → 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/README.md +9 -1
- data/lib/language_server/protocol/constant.rb +14 -0
- data/lib/language_server/protocol/constant/code_action_kind.rb +75 -0
- 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/error_codes.rb +1 -0
- data/lib/language_server/protocol/constant/failure_handling_kind.rb +29 -0
- data/lib/language_server/protocol/constant/resource_operation_kind.rb +23 -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 +186 -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 +92 -0
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +52 -0
- data/lib/language_server/protocol/interface/code_action_context.rb +18 -2
- data/lib/language_server/protocol/interface/code_action_options.rb +37 -0
- data/lib/language_server/protocol/interface/code_action_params.rb +3 -2
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +26 -0
- 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 +29 -5
- data/lib/language_server/protocol/interface/completion_options.rb +33 -11
- data/lib/language_server/protocol/interface/completion_params.rb +4 -3
- data/lib/language_server/protocol/interface/completion_registration_options.rb +4 -26
- data/lib/language_server/protocol/interface/create_file.rb +54 -0
- data/lib/language_server/protocol/interface/create_file_options.rb +45 -0
- 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/delete_file.rb +54 -0
- data/lib/language_server/protocol/interface/delete_file_options.rb +45 -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_filter.rb +8 -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/file_system_watcher.rb +9 -1
- data/lib/language_server/protocol/interface/folding_range.rb +74 -0
- 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 +34 -0
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +25 -0
- 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 +66 -0
- data/lib/language_server/protocol/interface/markup_content.rb +1 -1
- data/lib/language_server/protocol/interface/notification_message.rb +2 -1
- data/lib/language_server/protocol/interface/parameter_information.rb +9 -3
- 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_file.rb +63 -0
- data/lib/language_server/protocol/interface/rename_file_options.rb +45 -0
- data/lib/language_server/protocol/interface/rename_options.rb +34 -0
- data/lib/language_server/protocol/interface/rename_params.rb +3 -20
- data/lib/language_server/protocol/interface/rename_registration_options.rb +26 -0
- 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 +78 -53
- 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 +97 -75
- 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 +5 -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 +11 -5
- 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 +105 -29
- data/.gitignore +0 -10
- data/.travis.yml +0 -5
- data/CHANGELOG.md +0 -13
- 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 -27
- data/docker-compose.ci.yml +0 -14
- data/docker-compose.override.yml +0 -15
- data/docker-compose.yml +0 -31
- data/language_server-protocol.gemspec +0 -31
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +0 -55
- data/lib/language_server/protocol/interface/workspace_client_capabilites.rb +0 -82
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -104
- data/package.json +0 -10
- data/scripts/generateFiles.ts +0 -252
- data/yarn.lock +0 -293
@@ -0,0 +1,71 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Additional information about the context in which a signature help request was triggered.
|
6
|
+
#
|
7
|
+
class SignatureHelpContext
|
8
|
+
def initialize(trigger_kind:, trigger_character: nil, is_retrigger:, active_signature_help: nil)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:triggerKind] = trigger_kind
|
12
|
+
@attributes[:triggerCharacter] = trigger_character if trigger_character
|
13
|
+
@attributes[:isRetrigger] = is_retrigger
|
14
|
+
@attributes[:activeSignatureHelp] = active_signature_help if active_signature_help
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Action that caused signature help to be triggered.
|
21
|
+
#
|
22
|
+
# @return [CompletionTriggerKind]
|
23
|
+
def trigger_kind
|
24
|
+
attributes.fetch(:triggerKind)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Character that caused signature help to be triggered.
|
29
|
+
#
|
30
|
+
# This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
|
31
|
+
#
|
32
|
+
# @return [string]
|
33
|
+
def trigger_character
|
34
|
+
attributes.fetch(:triggerCharacter)
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# `true` if signature help was already showing when it was triggered.
|
39
|
+
#
|
40
|
+
# Retriggers occur when the signature help is already active and can be caused by actions such as
|
41
|
+
# typing a trigger character, a cursor move, or document content changes.
|
42
|
+
#
|
43
|
+
# @return [boolean]
|
44
|
+
def is_retrigger
|
45
|
+
attributes.fetch(:isRetrigger)
|
46
|
+
end
|
47
|
+
|
48
|
+
#
|
49
|
+
# The currently active `SignatureHelp`.
|
50
|
+
#
|
51
|
+
# The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
|
52
|
+
# the user navigating through available signatures.
|
53
|
+
#
|
54
|
+
# @return [SignatureHelp]
|
55
|
+
def active_signature_help
|
56
|
+
attributes.fetch(:activeSignatureHelp)
|
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
|
@@ -1,14 +1,13 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
class SignatureHelpOptions
|
8
|
-
def initialize(trigger_characters: nil)
|
4
|
+
class SignatureHelpOptions < WorkDoneProgressOptions
|
5
|
+
def initialize(work_done_progress: nil, trigger_characters: nil, retrigger_characters: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
11
9
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
10
|
+
@attributes[:retriggerCharacters] = retrigger_characters if retrigger_characters
|
12
11
|
|
13
12
|
@attributes.freeze
|
14
13
|
end
|
@@ -22,6 +21,17 @@ module LanguageServer
|
|
22
21
|
attributes.fetch(:triggerCharacters)
|
23
22
|
end
|
24
23
|
|
24
|
+
#
|
25
|
+
# List of characters that re-trigger signature help.
|
26
|
+
#
|
27
|
+
# These trigger characters are only active when signature help is already showing. All trigger characters
|
28
|
+
# are also counted as re-trigger characters.
|
29
|
+
#
|
30
|
+
# @return [string[]]
|
31
|
+
def retrigger_characters
|
32
|
+
attributes.fetch(:retriggerCharacters)
|
33
|
+
end
|
34
|
+
|
25
35
|
attr_reader :attributes
|
26
36
|
|
27
37
|
def to_hash
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class SignatureHelpParams < WorkDoneProgressParams
|
5
|
+
def initialize(work_done_token: nil, context: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
|
+
@attributes[:context] = context if context
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# The signature help context. This is only available if the client specifies
|
16
|
+
# to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
|
17
|
+
#
|
18
|
+
# @return [SignatureHelpContext]
|
19
|
+
def context
|
20
|
+
attributes.fetch(:context)
|
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
|
@@ -1,24 +1,17 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class SignatureHelpRegistrationOptions <
|
5
|
-
def initialize(
|
4
|
+
class SignatureHelpRegistrationOptions < SignatureHelpOptions
|
5
|
+
def initialize(work_done_progress: nil, trigger_characters: nil, retrigger_characters: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
8
9
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
10
|
+
@attributes[:retriggerCharacters] = retrigger_characters if retrigger_characters
|
9
11
|
|
10
12
|
@attributes.freeze
|
11
13
|
end
|
12
14
|
|
13
|
-
#
|
14
|
-
# The characters that trigger signature help
|
15
|
-
# automatically.
|
16
|
-
#
|
17
|
-
# @return [string[]]
|
18
|
-
def trigger_characters
|
19
|
-
attributes.fetch(:triggerCharacters)
|
20
|
-
end
|
21
|
-
|
22
15
|
attr_reader :attributes
|
23
16
|
|
24
17
|
def to_hash
|
@@ -8,6 +8,7 @@ module LanguageServer
|
|
8
8
|
def initialize(document_selector:, sync_kind:)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
|
+
@attributes[:documentSelector] = document_selector
|
11
12
|
@attributes[:syncKind] = sync_kind
|
12
13
|
|
13
14
|
@attributes.freeze
|
@@ -17,7 +18,7 @@ module LanguageServer
|
|
17
18
|
# How documents are synced to the server. See TextDocumentSyncKind.Full
|
18
19
|
# and TextDocumentSyncKind.Incremental.
|
19
20
|
#
|
20
|
-
# @return [
|
21
|
+
# @return [any]
|
21
22
|
def sync_kind
|
22
23
|
attributes.fetch(:syncKind)
|
23
24
|
end
|
@@ -5,157 +5,140 @@ module LanguageServer
|
|
5
5
|
# Text document specific client capabilities.
|
6
6
|
#
|
7
7
|
class TextDocumentClientCapabilities
|
8
|
-
def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil,
|
8
|
+
def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, publish_diagnostics: nil, folding_range: nil, selection_range: nil)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
11
|
@attributes[:synchronization] = synchronization if synchronization
|
12
12
|
@attributes[:completion] = completion if completion
|
13
13
|
@attributes[:hover] = hover if hover
|
14
14
|
@attributes[:signatureHelp] = signature_help if signature_help
|
15
|
-
@attributes[:
|
16
|
-
@attributes[:documentHighlight] = document_highlight if document_highlight
|
17
|
-
@attributes[:documentSymbol] = document_symbol if document_symbol
|
18
|
-
@attributes[:formatting] = formatting if formatting
|
19
|
-
@attributes[:rangeFormatting] = range_formatting if range_formatting
|
20
|
-
@attributes[:onTypeFormatting] = on_type_formatting if on_type_formatting
|
15
|
+
@attributes[:declaration] = declaration if declaration
|
21
16
|
@attributes[:definition] = definition if definition
|
22
17
|
@attributes[:typeDefinition] = type_definition if type_definition
|
23
18
|
@attributes[:implementation] = implementation if implementation
|
19
|
+
@attributes[:references] = references if references
|
20
|
+
@attributes[:documentHighlight] = document_highlight if document_highlight
|
21
|
+
@attributes[:documentSymbol] = document_symbol if document_symbol
|
24
22
|
@attributes[:codeAction] = code_action if code_action
|
25
23
|
@attributes[:codeLens] = code_lens if code_lens
|
26
24
|
@attributes[:documentLink] = document_link if document_link
|
27
25
|
@attributes[:colorProvider] = color_provider if color_provider
|
26
|
+
@attributes[:formatting] = formatting if formatting
|
27
|
+
@attributes[:rangeFormatting] = range_formatting if range_formatting
|
28
|
+
@attributes[:onTypeFormatting] = on_type_formatting if on_type_formatting
|
28
29
|
@attributes[:rename] = rename if rename
|
29
30
|
@attributes[:publishDiagnostics] = publish_diagnostics if publish_diagnostics
|
31
|
+
@attributes[:foldingRange] = folding_range if folding_range
|
32
|
+
@attributes[:selectionRange] = selection_range if selection_range
|
30
33
|
|
31
34
|
@attributes.freeze
|
32
35
|
end
|
33
36
|
|
34
|
-
# @return [
|
37
|
+
# @return [TextDocumentSyncClientCapabilities]
|
35
38
|
def synchronization
|
36
39
|
attributes.fetch(:synchronization)
|
37
40
|
end
|
38
41
|
|
39
42
|
#
|
40
|
-
# Capabilities specific to the `textDocument/completion`
|
43
|
+
# Capabilities specific to the `textDocument/completion` request.
|
41
44
|
#
|
42
|
-
# @return [
|
45
|
+
# @return [CompletionClientCapabilities]
|
43
46
|
def completion
|
44
47
|
attributes.fetch(:completion)
|
45
48
|
end
|
46
49
|
|
47
50
|
#
|
48
|
-
# Capabilities specific to the `textDocument/hover`
|
51
|
+
# Capabilities specific to the `textDocument/hover` request.
|
49
52
|
#
|
50
|
-
# @return [
|
53
|
+
# @return [HoverClientCapabilities]
|
51
54
|
def hover
|
52
55
|
attributes.fetch(:hover)
|
53
56
|
end
|
54
57
|
|
55
58
|
#
|
56
|
-
# Capabilities specific to the `textDocument/signatureHelp`
|
59
|
+
# Capabilities specific to the `textDocument/signatureHelp` request.
|
57
60
|
#
|
58
|
-
# @return [
|
61
|
+
# @return [SignatureHelpClientCapabilities]
|
59
62
|
def signature_help
|
60
63
|
attributes.fetch(:signatureHelp)
|
61
64
|
end
|
62
65
|
|
63
66
|
#
|
64
|
-
# Capabilities specific to the `textDocument/
|
65
|
-
#
|
66
|
-
# @return [{ dynamicRegistration?: boolean; }]
|
67
|
-
def references
|
68
|
-
attributes.fetch(:references)
|
69
|
-
end
|
70
|
-
|
71
|
-
#
|
72
|
-
# Capabilities specific to the `textDocument/documentHighlight`
|
73
|
-
#
|
74
|
-
# @return [{ dynamicRegistration?: boolean; }]
|
75
|
-
def document_highlight
|
76
|
-
attributes.fetch(:documentHighlight)
|
77
|
-
end
|
78
|
-
|
79
|
-
#
|
80
|
-
# Capabilities specific to the `textDocument/documentSymbol`
|
67
|
+
# Capabilities specific to the `textDocument/declaration` request.
|
81
68
|
#
|
82
|
-
# @return [
|
83
|
-
def
|
84
|
-
attributes.fetch(:
|
69
|
+
# @return [DeclarationClientCapabilities]
|
70
|
+
def declaration
|
71
|
+
attributes.fetch(:declaration)
|
85
72
|
end
|
86
73
|
|
87
74
|
#
|
88
|
-
# Capabilities specific to the `textDocument/
|
75
|
+
# Capabilities specific to the `textDocument/definition` request.
|
89
76
|
#
|
90
|
-
# @return [
|
91
|
-
def
|
92
|
-
attributes.fetch(:
|
77
|
+
# @return [DefinitionClientCapabilities]
|
78
|
+
def definition
|
79
|
+
attributes.fetch(:definition)
|
93
80
|
end
|
94
81
|
|
95
82
|
#
|
96
|
-
# Capabilities specific to the `textDocument/
|
83
|
+
# Capabilities specific to the `textDocument/typeDefinition` request.
|
97
84
|
#
|
98
|
-
# @return [
|
99
|
-
def
|
100
|
-
attributes.fetch(:
|
85
|
+
# @return [TypeDefinitionClientCapabilities]
|
86
|
+
def type_definition
|
87
|
+
attributes.fetch(:typeDefinition)
|
101
88
|
end
|
102
89
|
|
103
90
|
#
|
104
|
-
# Capabilities specific to the `textDocument/
|
91
|
+
# Capabilities specific to the `textDocument/implementation` request.
|
105
92
|
#
|
106
|
-
# @return [
|
107
|
-
def
|
108
|
-
attributes.fetch(:
|
93
|
+
# @return [ImplementationClientCapabilities]
|
94
|
+
def implementation
|
95
|
+
attributes.fetch(:implementation)
|
109
96
|
end
|
110
97
|
|
111
98
|
#
|
112
|
-
# Capabilities specific to the `textDocument/
|
99
|
+
# Capabilities specific to the `textDocument/references` request.
|
113
100
|
#
|
114
|
-
# @return [
|
115
|
-
def
|
116
|
-
attributes.fetch(:
|
101
|
+
# @return [ReferenceClientCapabilities]
|
102
|
+
def references
|
103
|
+
attributes.fetch(:references)
|
117
104
|
end
|
118
105
|
|
119
106
|
#
|
120
|
-
# Capabilities specific to the `textDocument/
|
121
|
-
#
|
122
|
-
# Since 3.6.0
|
107
|
+
# Capabilities specific to the `textDocument/documentHighlight` request.
|
123
108
|
#
|
124
|
-
# @return [
|
125
|
-
def
|
126
|
-
attributes.fetch(:
|
109
|
+
# @return [DocumentHighlightClientCapabilities]
|
110
|
+
def document_highlight
|
111
|
+
attributes.fetch(:documentHighlight)
|
127
112
|
end
|
128
113
|
|
129
114
|
#
|
130
|
-
# Capabilities specific to the `textDocument/
|
131
|
-
#
|
132
|
-
# Since 3.6.0
|
115
|
+
# Capabilities specific to the `textDocument/documentSymbol` request.
|
133
116
|
#
|
134
|
-
# @return [
|
135
|
-
def
|
136
|
-
attributes.fetch(:
|
117
|
+
# @return [DocumentSymbolClientCapabilities]
|
118
|
+
def document_symbol
|
119
|
+
attributes.fetch(:documentSymbol)
|
137
120
|
end
|
138
121
|
|
139
122
|
#
|
140
|
-
# Capabilities specific to the `textDocument/codeAction`
|
123
|
+
# Capabilities specific to the `textDocument/codeAction` request.
|
141
124
|
#
|
142
|
-
# @return [
|
125
|
+
# @return [CodeActionClientCapabilities]
|
143
126
|
def code_action
|
144
127
|
attributes.fetch(:codeAction)
|
145
128
|
end
|
146
129
|
|
147
130
|
#
|
148
|
-
# Capabilities specific to the `textDocument/codeLens`
|
131
|
+
# Capabilities specific to the `textDocument/codeLens` request.
|
149
132
|
#
|
150
|
-
# @return [
|
133
|
+
# @return [CodeLensClientCapabilities]
|
151
134
|
def code_lens
|
152
135
|
attributes.fetch(:codeLens)
|
153
136
|
end
|
154
137
|
|
155
138
|
#
|
156
|
-
# Capabilities specific to the `textDocument/documentLink`
|
139
|
+
# Capabilities specific to the `textDocument/documentLink` request.
|
157
140
|
#
|
158
|
-
# @return [
|
141
|
+
# @return [DocumentLinkClientCapabilities]
|
159
142
|
def document_link
|
160
143
|
attributes.fetch(:documentLink)
|
161
144
|
end
|
@@ -164,29 +147,68 @@ module LanguageServer
|
|
164
147
|
# Capabilities specific to the `textDocument/documentColor` and the
|
165
148
|
# `textDocument/colorPresentation` request.
|
166
149
|
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
# @return [{ dynamicRegistration?: boolean; }]
|
150
|
+
# @return [DocumentColorClientCapabilities]
|
170
151
|
def color_provider
|
171
152
|
attributes.fetch(:colorProvider)
|
172
153
|
end
|
173
154
|
|
174
155
|
#
|
175
|
-
# Capabilities specific to the `textDocument/
|
156
|
+
# Capabilities specific to the `textDocument/formatting` request.
|
157
|
+
#
|
158
|
+
# @return [DocumentFormattingClientCapabilities]
|
159
|
+
def formatting
|
160
|
+
attributes.fetch(:formatting)
|
161
|
+
end
|
162
|
+
|
163
|
+
#
|
164
|
+
# Capabilities specific to the `textDocument/rangeFormatting` request.
|
176
165
|
#
|
177
|
-
# @return [
|
166
|
+
# @return [DocumentRangeFormattingClientCapabilities]
|
167
|
+
def range_formatting
|
168
|
+
attributes.fetch(:rangeFormatting)
|
169
|
+
end
|
170
|
+
|
171
|
+
#
|
172
|
+
# request.
|
173
|
+
# Capabilities specific to the `textDocument/onTypeFormatting` request.
|
174
|
+
#
|
175
|
+
# @return [DocumentOnTypeFormattingClientCapabilities]
|
176
|
+
def on_type_formatting
|
177
|
+
attributes.fetch(:onTypeFormatting)
|
178
|
+
end
|
179
|
+
|
180
|
+
#
|
181
|
+
# Capabilities specific to the `textDocument/rename` request.
|
182
|
+
#
|
183
|
+
# @return [RenameClientCapabilities]
|
178
184
|
def rename
|
179
185
|
attributes.fetch(:rename)
|
180
186
|
end
|
181
187
|
|
182
188
|
#
|
183
|
-
# Capabilities specific to `textDocument/publishDiagnostics
|
189
|
+
# Capabilities specific to the `textDocument/publishDiagnostics` notification.
|
184
190
|
#
|
185
|
-
# @return [
|
191
|
+
# @return [PublishDiagnosticsClientCapabilities]
|
186
192
|
def publish_diagnostics
|
187
193
|
attributes.fetch(:publishDiagnostics)
|
188
194
|
end
|
189
195
|
|
196
|
+
#
|
197
|
+
# Capabilities specific to the `textDocument/foldingRange` request.
|
198
|
+
#
|
199
|
+
# @return [FoldingRangeClientCapabilities]
|
200
|
+
def folding_range
|
201
|
+
attributes.fetch(:foldingRange)
|
202
|
+
end
|
203
|
+
|
204
|
+
#
|
205
|
+
# Capabilities specific to the `textDocument/selectionRange` request.
|
206
|
+
#
|
207
|
+
# @return [SelectionRangeClientCapabilities]
|
208
|
+
def selection_range
|
209
|
+
attributes.fetch(:selectionRange)
|
210
|
+
end
|
211
|
+
|
190
212
|
attr_reader :attributes
|
191
213
|
|
192
214
|
def to_hash
|