language_server-protocol 3.14.0.2 → 3.15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,24 +1,16 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentLinkRegistrationOptions <
|
5
|
-
def initialize(
|
4
|
+
class DocumentLinkRegistrationOptions < DocumentLinkOptions
|
5
|
+
def initialize(work_done_progress: nil, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
-
@attributes[:
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
9
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
10
10
|
|
11
11
|
@attributes.freeze
|
12
12
|
end
|
13
13
|
|
14
|
-
#
|
15
|
-
# Document links have a resolve provider as well.
|
16
|
-
#
|
17
|
-
# @return [boolean]
|
18
|
-
def resolve_provider
|
19
|
-
attributes.fetch(:resolveProvider)
|
20
|
-
end
|
21
|
-
|
22
14
|
attr_reader :attributes
|
23
15
|
|
24
16
|
def to_hash
|
data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentOnTypeFormattingClientCapabilities
|
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 on type 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
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentOnTypeFormattingParams
|
4
|
+
class DocumentOnTypeFormattingParams < TextDocumentPositionParams
|
5
5
|
def initialize(text_document:, position:, ch:, options:)
|
6
6
|
@attributes = {}
|
7
7
|
|
@@ -13,22 +13,6 @@ module LanguageServer
|
|
13
13
|
@attributes.freeze
|
14
14
|
end
|
15
15
|
|
16
|
-
#
|
17
|
-
# The document to format.
|
18
|
-
#
|
19
|
-
# @return [TextDocumentIdentifier]
|
20
|
-
def text_document
|
21
|
-
attributes.fetch(:textDocument)
|
22
|
-
end
|
23
|
-
|
24
|
-
#
|
25
|
-
# The position at which this request was sent.
|
26
|
-
#
|
27
|
-
# @return [Position]
|
28
|
-
def position
|
29
|
-
attributes.fetch(:position)
|
30
|
-
end
|
31
|
-
|
32
16
|
#
|
33
17
|
# The character that has been typed.
|
34
18
|
#
|
data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb
CHANGED
@@ -1,33 +1,16 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentOnTypeFormattingRegistrationOptions <
|
5
|
-
def initialize(
|
4
|
+
class DocumentOnTypeFormattingRegistrationOptions < DocumentOnTypeFormattingOptions
|
5
|
+
def initialize(first_trigger_character:, more_trigger_character: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
-
@attributes[:documentSelector] = document_selector
|
9
8
|
@attributes[:firstTriggerCharacter] = first_trigger_character
|
10
9
|
@attributes[:moreTriggerCharacter] = more_trigger_character if more_trigger_character
|
11
10
|
|
12
11
|
@attributes.freeze
|
13
12
|
end
|
14
13
|
|
15
|
-
#
|
16
|
-
# A character on which formatting should be triggered, like `}`.
|
17
|
-
#
|
18
|
-
# @return [string]
|
19
|
-
def first_trigger_character
|
20
|
-
attributes.fetch(:firstTriggerCharacter)
|
21
|
-
end
|
22
|
-
|
23
|
-
#
|
24
|
-
# More trigger characters.
|
25
|
-
#
|
26
|
-
# @return [string[]]
|
27
|
-
def more_trigger_character
|
28
|
-
attributes.fetch(:moreTriggerCharacter)
|
29
|
-
end
|
30
|
-
|
31
14
|
attr_reader :attributes
|
32
15
|
|
33
16
|
def to_hash
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentRangeFormattingClientCapabilities
|
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 DocumentRangeFormattingOptions < 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 DocumentRangeFormattingParams
|
5
|
-
def initialize(text_document:, range:, options:)
|
4
|
+
class DocumentRangeFormattingParams < WorkDoneProgressParams
|
5
|
+
def initialize(work_done_token: nil, text_document:, range:, 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[:range] = range
|
10
11
|
@attributes[:options] = options
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentRangeFormattingRegistrationOptions < DocumentRangeFormattingOptions
|
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,96 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be
|
6
|
+
# hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range,
|
7
|
+
# e.g. the range of an identifier.
|
8
|
+
#
|
9
|
+
class DocumentSymbol
|
10
|
+
def initialize(name:, detail: nil, kind:, deprecated: nil, range:, selection_range:, children: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:name] = name
|
14
|
+
@attributes[:detail] = detail if detail
|
15
|
+
@attributes[:kind] = kind
|
16
|
+
@attributes[:deprecated] = deprecated if deprecated
|
17
|
+
@attributes[:range] = range
|
18
|
+
@attributes[:selectionRange] = selection_range
|
19
|
+
@attributes[:children] = children if children
|
20
|
+
|
21
|
+
@attributes.freeze
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# The name of this symbol. Will be displayed in the user interface and therefore must not be
|
26
|
+
# an empty string or a string only consisting of white spaces.
|
27
|
+
#
|
28
|
+
# @return [string]
|
29
|
+
def name
|
30
|
+
attributes.fetch(:name)
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# More detail for this symbol, e.g the signature of a function.
|
35
|
+
#
|
36
|
+
# @return [string]
|
37
|
+
def detail
|
38
|
+
attributes.fetch(:detail)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# The kind of this symbol.
|
43
|
+
#
|
44
|
+
# @return [any]
|
45
|
+
def kind
|
46
|
+
attributes.fetch(:kind)
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Indicates if this symbol is deprecated.
|
51
|
+
#
|
52
|
+
# @return [boolean]
|
53
|
+
def deprecated
|
54
|
+
attributes.fetch(:deprecated)
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# The range enclosing this symbol not including leading/trailing whitespace but everything else
|
59
|
+
# like comments. This information is typically used to determine if the clients cursor is
|
60
|
+
# inside the symbol to reveal in the symbol in the UI.
|
61
|
+
#
|
62
|
+
# @return [Range]
|
63
|
+
def range
|
64
|
+
attributes.fetch(:range)
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
|
69
|
+
# Must be contained by the `range`.
|
70
|
+
#
|
71
|
+
# @return [Range]
|
72
|
+
def selection_range
|
73
|
+
attributes.fetch(:selectionRange)
|
74
|
+
end
|
75
|
+
|
76
|
+
#
|
77
|
+
# Children of this symbol, e.g. properties of a class.
|
78
|
+
#
|
79
|
+
# @return [DocumentSymbol[]]
|
80
|
+
def children
|
81
|
+
attributes.fetch(:children)
|
82
|
+
end
|
83
|
+
|
84
|
+
attr_reader :attributes
|
85
|
+
|
86
|
+
def to_hash
|
87
|
+
attributes
|
88
|
+
end
|
89
|
+
|
90
|
+
def to_json(*args)
|
91
|
+
to_hash.to_json(*args)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentSymbolClientCapabilities
|
5
|
+
def initialize(dynamic_registration: nil, symbol_kind: nil, hierarchical_document_symbol_support: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
|
+
@attributes[:symbolKind] = symbol_kind if symbol_kind
|
10
|
+
@attributes[:hierarchicalDocumentSymbolSupport] = hierarchical_document_symbol_support if hierarchical_document_symbol_support
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
14
|
+
|
15
|
+
#
|
16
|
+
# Whether document symbol supports dynamic registration.
|
17
|
+
#
|
18
|
+
# @return [boolean]
|
19
|
+
def dynamic_registration
|
20
|
+
attributes.fetch(:dynamicRegistration)
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Specific capabilities for the `SymbolKind` in the `textDocument/documentSymbol` request.
|
25
|
+
#
|
26
|
+
# @return [{ valueSet?: any[]; }]
|
27
|
+
def symbol_kind
|
28
|
+
attributes.fetch(:symbolKind)
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# The client supports hierarchical document symbols.
|
33
|
+
#
|
34
|
+
# @return [boolean]
|
35
|
+
def hierarchical_document_symbol_support
|
36
|
+
attributes.fetch(:hierarchicalDocumentSymbolSupport)
|
37
|
+
end
|
38
|
+
|
39
|
+
attr_reader :attributes
|
40
|
+
|
41
|
+
def to_hash
|
42
|
+
attributes
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_json(*args)
|
46
|
+
to_hash.to_json(*args)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentSymbolOptions < 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 DocumentSymbolParams
|
5
|
-
def initialize(text_document:)
|
4
|
+
class DocumentSymbolParams < PartialResultParams
|
5
|
+
def initialize(partial_result_token: nil, text_document:)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
8
9
|
@attributes[:textDocument] = text_document
|
9
10
|
|
10
11
|
@attributes.freeze
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentSymbolRegistrationOptions < DocumentSymbolOptions
|
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
|