language_server-protocol 3.16.0.0 → 3.16.0.1
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 +2 -0
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +19 -1
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +20 -2
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +6 -1
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +20 -2
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +28 -2
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/code_action_options.rb +6 -1
- data/lib/language_server/protocol/interface/code_action_params.rb +20 -2
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +37 -2
- data/lib/language_server/protocol/interface/code_lens_options.rb +6 -1
- data/lib/language_server/protocol/interface/code_lens_params.rb +20 -2
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +25 -2
- data/lib/language_server/protocol/interface/color_presentation_params.rb +20 -2
- data/lib/language_server/protocol/interface/completion_options.rb +6 -1
- data/lib/language_server/protocol/interface/completion_params.rb +38 -2
- data/lib/language_server/protocol/interface/completion_registration_options.rb +57 -2
- data/lib/language_server/protocol/interface/declaration_options.rb +6 -1
- data/lib/language_server/protocol/interface/declaration_params.rb +38 -2
- data/lib/language_server/protocol/interface/declaration_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/definition_options.rb +6 -1
- data/lib/language_server/protocol/interface/definition_params.rb +38 -2
- data/lib/language_server/protocol/interface/definition_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_color_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_color_params.rb +20 -2
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/document_formatting_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_formatting_params.rb +9 -1
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_highlight_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_highlight_params.rb +38 -2
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_link_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_link_params.rb +20 -2
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +25 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +17 -1
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +28 -2
- data/lib/language_server/protocol/interface/document_range_formatting_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +9 -1
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_symbol_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_symbol_params.rb +20 -2
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +26 -2
- data/lib/language_server/protocol/interface/execute_command_options.rb +6 -1
- data/lib/language_server/protocol/interface/execute_command_params.rb +9 -1
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +14 -1
- data/lib/language_server/protocol/interface/folding_range_options.rb +6 -1
- data/lib/language_server/protocol/interface/folding_range_params.rb +20 -2
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/hover_options.rb +6 -1
- data/lib/language_server/protocol/interface/hover_params.rb +28 -2
- data/lib/language_server/protocol/interface/hover_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/implementation_options.rb +6 -1
- data/lib/language_server/protocol/interface/implementation_params.rb +38 -2
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/initialize_params.rb +9 -1
- data/lib/language_server/protocol/interface/linked_editing_range_options.rb +6 -1
- data/lib/language_server/protocol/interface/linked_editing_range_params.rb +28 -2
- data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/moniker_options.rb +6 -1
- data/lib/language_server/protocol/interface/moniker_params.rb +38 -2
- data/lib/language_server/protocol/interface/moniker_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/notification_message.rb +6 -1
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +9 -1
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +17 -1
- data/lib/language_server/protocol/interface/reference_options.rb +6 -1
- data/lib/language_server/protocol/interface/reference_params.rb +38 -2
- data/lib/language_server/protocol/interface/reference_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/rename_options.rb +6 -1
- data/lib/language_server/protocol/interface/rename_params.rb +28 -2
- data/lib/language_server/protocol/interface/rename_registration_options.rb +25 -2
- data/lib/language_server/protocol/interface/request_message.rb +6 -1
- data/lib/language_server/protocol/interface/response_message.rb +6 -1
- data/lib/language_server/protocol/interface/selection_range_options.rb +6 -1
- data/lib/language_server/protocol/interface/selection_range_params.rb +20 -2
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +20 -2
- data/lib/language_server/protocol/interface/semantic_tokens_options.rb +6 -1
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +20 -2
- data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +20 -2
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +55 -2
- data/lib/language_server/protocol/interface/signature_help_options.rb +6 -1
- data/lib/language_server/protocol/interface/signature_help_params.rb +28 -2
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +38 -2
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +10 -1
- data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +10 -1
- data/lib/language_server/protocol/interface/type_definition_options.rb +6 -1
- data/lib/language_server/protocol/interface/type_definition_params.rb +38 -2
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +9 -1
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +6 -1
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +20 -2
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +6 -1
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +3 -3
|
@@ -1,15 +1,40 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentColorRegistrationOptions
|
|
5
|
-
def initialize(work_done_progress: nil)
|
|
4
|
+
class DocumentColorRegistrationOptions
|
|
5
|
+
def initialize(document_selector:, id: nil, work_done_progress: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:documentSelector] = document_selector
|
|
9
|
+
@attributes[:id] = id if id
|
|
8
10
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
|
9
11
|
|
|
10
12
|
@attributes.freeze
|
|
11
13
|
end
|
|
12
14
|
|
|
15
|
+
#
|
|
16
|
+
# A document selector to identify the scope of the registration. If set to
|
|
17
|
+
# null the document selector provided on the client side will be used.
|
|
18
|
+
#
|
|
19
|
+
# @return [DocumentSelector]
|
|
20
|
+
def document_selector
|
|
21
|
+
attributes.fetch(:documentSelector)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# The id used to register the request. The id can be used to deregister
|
|
26
|
+
# the request again. See also Registration#id.
|
|
27
|
+
#
|
|
28
|
+
# @return [string]
|
|
29
|
+
def id
|
|
30
|
+
attributes.fetch(:id)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @return [boolean]
|
|
34
|
+
def work_done_progress
|
|
35
|
+
attributes.fetch(:workDoneProgress)
|
|
36
|
+
end
|
|
37
|
+
|
|
13
38
|
attr_reader :attributes
|
|
14
39
|
|
|
15
40
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentFormattingOptions
|
|
4
|
+
class DocumentFormattingOptions
|
|
5
5
|
def initialize(work_done_progress: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -10,6 +10,11 @@ module LanguageServer
|
|
|
10
10
|
@attributes.freeze
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# @return [boolean]
|
|
14
|
+
def work_done_progress
|
|
15
|
+
attributes.fetch(:workDoneProgress)
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
attr_reader :attributes
|
|
14
19
|
|
|
15
20
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentFormattingParams
|
|
4
|
+
class DocumentFormattingParams
|
|
5
5
|
def initialize(work_done_token: nil, text_document:, options:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -12,6 +12,14 @@ module LanguageServer
|
|
|
12
12
|
@attributes.freeze
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
#
|
|
16
|
+
# An optional token that a server can use to report work done progress.
|
|
17
|
+
#
|
|
18
|
+
# @return [ProgressToken]
|
|
19
|
+
def work_done_token
|
|
20
|
+
attributes.fetch(:workDoneToken)
|
|
21
|
+
end
|
|
22
|
+
|
|
15
23
|
#
|
|
16
24
|
# The document to format.
|
|
17
25
|
#
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentFormattingRegistrationOptions
|
|
5
|
-
def initialize(work_done_progress: nil)
|
|
4
|
+
class DocumentFormattingRegistrationOptions
|
|
5
|
+
def initialize(document_selector:, work_done_progress: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:documentSelector] = document_selector
|
|
8
9
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
|
9
10
|
|
|
10
11
|
@attributes.freeze
|
|
11
12
|
end
|
|
12
13
|
|
|
14
|
+
#
|
|
15
|
+
# A document selector to identify the scope of the registration. If set to
|
|
16
|
+
# null the document selector provided on the client side will be used.
|
|
17
|
+
#
|
|
18
|
+
# @return [DocumentSelector]
|
|
19
|
+
def document_selector
|
|
20
|
+
attributes.fetch(:documentSelector)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @return [boolean]
|
|
24
|
+
def work_done_progress
|
|
25
|
+
attributes.fetch(:workDoneProgress)
|
|
26
|
+
end
|
|
27
|
+
|
|
13
28
|
attr_reader :attributes
|
|
14
29
|
|
|
15
30
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentHighlightOptions
|
|
4
|
+
class DocumentHighlightOptions
|
|
5
5
|
def initialize(work_done_progress: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -10,6 +10,11 @@ module LanguageServer
|
|
|
10
10
|
@attributes.freeze
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# @return [boolean]
|
|
14
|
+
def work_done_progress
|
|
15
|
+
attributes.fetch(:workDoneProgress)
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
attr_reader :attributes
|
|
14
19
|
|
|
15
20
|
def to_hash
|
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentHighlightParams
|
|
5
|
-
def initialize(partial_result_token: nil)
|
|
4
|
+
class DocumentHighlightParams
|
|
5
|
+
def initialize(text_document:, position:, work_done_token: nil, partial_result_token: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:textDocument] = text_document
|
|
9
|
+
@attributes[:position] = position
|
|
10
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
|
8
11
|
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
9
12
|
|
|
10
13
|
@attributes.freeze
|
|
11
14
|
end
|
|
12
15
|
|
|
16
|
+
#
|
|
17
|
+
# The text document.
|
|
18
|
+
#
|
|
19
|
+
# @return [TextDocumentIdentifier]
|
|
20
|
+
def text_document
|
|
21
|
+
attributes.fetch(:textDocument)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# The position inside the text document.
|
|
26
|
+
#
|
|
27
|
+
# @return [Position]
|
|
28
|
+
def position
|
|
29
|
+
attributes.fetch(:position)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# An optional token that a server can use to report work done progress.
|
|
34
|
+
#
|
|
35
|
+
# @return [ProgressToken]
|
|
36
|
+
def work_done_token
|
|
37
|
+
attributes.fetch(:workDoneToken)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
#
|
|
41
|
+
# An optional token that a server can use to report partial results (e.g.
|
|
42
|
+
# streaming) to the client.
|
|
43
|
+
#
|
|
44
|
+
# @return [ProgressToken]
|
|
45
|
+
def partial_result_token
|
|
46
|
+
attributes.fetch(:partialResultToken)
|
|
47
|
+
end
|
|
48
|
+
|
|
13
49
|
attr_reader :attributes
|
|
14
50
|
|
|
15
51
|
def to_hash
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentHighlightRegistrationOptions
|
|
5
|
-
def initialize(work_done_progress: nil)
|
|
4
|
+
class DocumentHighlightRegistrationOptions
|
|
5
|
+
def initialize(document_selector:, work_done_progress: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:documentSelector] = document_selector
|
|
8
9
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
|
9
10
|
|
|
10
11
|
@attributes.freeze
|
|
11
12
|
end
|
|
12
13
|
|
|
14
|
+
#
|
|
15
|
+
# A document selector to identify the scope of the registration. If set to
|
|
16
|
+
# null the document selector provided on the client side will be used.
|
|
17
|
+
#
|
|
18
|
+
# @return [DocumentSelector]
|
|
19
|
+
def document_selector
|
|
20
|
+
attributes.fetch(:documentSelector)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @return [boolean]
|
|
24
|
+
def work_done_progress
|
|
25
|
+
attributes.fetch(:workDoneProgress)
|
|
26
|
+
end
|
|
27
|
+
|
|
13
28
|
attr_reader :attributes
|
|
14
29
|
|
|
15
30
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentLinkOptions
|
|
4
|
+
class DocumentLinkOptions
|
|
5
5
|
def initialize(work_done_progress: nil, resolve_provider: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -11,6 +11,11 @@ module LanguageServer
|
|
|
11
11
|
@attributes.freeze
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# @return [boolean]
|
|
15
|
+
def work_done_progress
|
|
16
|
+
attributes.fetch(:workDoneProgress)
|
|
17
|
+
end
|
|
18
|
+
|
|
14
19
|
#
|
|
15
20
|
# Document links have a resolve provider as well.
|
|
16
21
|
#
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentLinkParams
|
|
5
|
-
def initialize(partial_result_token: nil, text_document:)
|
|
4
|
+
class DocumentLinkParams
|
|
5
|
+
def initialize(work_done_token: nil, partial_result_token: nil, text_document:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
|
8
9
|
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
9
10
|
@attributes[:textDocument] = text_document
|
|
10
11
|
|
|
11
12
|
@attributes.freeze
|
|
12
13
|
end
|
|
13
14
|
|
|
15
|
+
#
|
|
16
|
+
# An optional token that a server can use to report work done progress.
|
|
17
|
+
#
|
|
18
|
+
# @return [ProgressToken]
|
|
19
|
+
def work_done_token
|
|
20
|
+
attributes.fetch(:workDoneToken)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
#
|
|
24
|
+
# An optional token that a server can use to report partial results (e.g.
|
|
25
|
+
# streaming) to the client.
|
|
26
|
+
#
|
|
27
|
+
# @return [ProgressToken]
|
|
28
|
+
def partial_result_token
|
|
29
|
+
attributes.fetch(:partialResultToken)
|
|
30
|
+
end
|
|
31
|
+
|
|
14
32
|
#
|
|
15
33
|
# The document to provide document links for.
|
|
16
34
|
#
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentLinkRegistrationOptions
|
|
5
|
-
def initialize(work_done_progress: nil, resolve_provider: nil)
|
|
4
|
+
class DocumentLinkRegistrationOptions
|
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, resolve_provider: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:documentSelector] = document_selector
|
|
8
9
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
|
9
10
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
|
10
11
|
|
|
11
12
|
@attributes.freeze
|
|
12
13
|
end
|
|
13
14
|
|
|
15
|
+
#
|
|
16
|
+
# A document selector to identify the scope of the registration. If set to
|
|
17
|
+
# null the document selector provided on the client side will be used.
|
|
18
|
+
#
|
|
19
|
+
# @return [DocumentSelector]
|
|
20
|
+
def document_selector
|
|
21
|
+
attributes.fetch(:documentSelector)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# @return [boolean]
|
|
25
|
+
def work_done_progress
|
|
26
|
+
attributes.fetch(:workDoneProgress)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
#
|
|
30
|
+
# Document links have a resolve provider as well.
|
|
31
|
+
#
|
|
32
|
+
# @return [boolean]
|
|
33
|
+
def resolve_provider
|
|
34
|
+
attributes.fetch(:resolveProvider)
|
|
35
|
+
end
|
|
36
|
+
|
|
14
37
|
attr_reader :attributes
|
|
15
38
|
|
|
16
39
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentOnTypeFormattingParams
|
|
4
|
+
class DocumentOnTypeFormattingParams
|
|
5
5
|
def initialize(text_document:, position:, ch:, options:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -13,6 +13,22 @@ module LanguageServer
|
|
|
13
13
|
@attributes.freeze
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
#
|
|
17
|
+
# The text document.
|
|
18
|
+
#
|
|
19
|
+
# @return [TextDocumentIdentifier]
|
|
20
|
+
def text_document
|
|
21
|
+
attributes.fetch(:textDocument)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# The position inside the text document.
|
|
26
|
+
#
|
|
27
|
+
# @return [Position]
|
|
28
|
+
def position
|
|
29
|
+
attributes.fetch(:position)
|
|
30
|
+
end
|
|
31
|
+
|
|
16
32
|
#
|
|
17
33
|
# The character that has been typed.
|
|
18
34
|
#
|
data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb
CHANGED
|
@@ -1,16 +1,42 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentOnTypeFormattingRegistrationOptions
|
|
5
|
-
def initialize(first_trigger_character:, more_trigger_character: nil)
|
|
4
|
+
class DocumentOnTypeFormattingRegistrationOptions
|
|
5
|
+
def initialize(document_selector:, first_trigger_character:, more_trigger_character: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:documentSelector] = document_selector
|
|
8
9
|
@attributes[:firstTriggerCharacter] = first_trigger_character
|
|
9
10
|
@attributes[:moreTriggerCharacter] = more_trigger_character if more_trigger_character
|
|
10
11
|
|
|
11
12
|
@attributes.freeze
|
|
12
13
|
end
|
|
13
14
|
|
|
15
|
+
#
|
|
16
|
+
# A document selector to identify the scope of the registration. If set to
|
|
17
|
+
# null the document selector provided on the client side will be used.
|
|
18
|
+
#
|
|
19
|
+
# @return [DocumentSelector]
|
|
20
|
+
def document_selector
|
|
21
|
+
attributes.fetch(:documentSelector)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# A character on which formatting should be triggered, like `}`.
|
|
26
|
+
#
|
|
27
|
+
# @return [string]
|
|
28
|
+
def first_trigger_character
|
|
29
|
+
attributes.fetch(:firstTriggerCharacter)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# More trigger characters.
|
|
34
|
+
#
|
|
35
|
+
# @return [string[]]
|
|
36
|
+
def more_trigger_character
|
|
37
|
+
attributes.fetch(:moreTriggerCharacter)
|
|
38
|
+
end
|
|
39
|
+
|
|
14
40
|
attr_reader :attributes
|
|
15
41
|
|
|
16
42
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentRangeFormattingOptions
|
|
4
|
+
class DocumentRangeFormattingOptions
|
|
5
5
|
def initialize(work_done_progress: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -10,6 +10,11 @@ module LanguageServer
|
|
|
10
10
|
@attributes.freeze
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# @return [boolean]
|
|
14
|
+
def work_done_progress
|
|
15
|
+
attributes.fetch(:workDoneProgress)
|
|
16
|
+
end
|
|
17
|
+
|
|
13
18
|
attr_reader :attributes
|
|
14
19
|
|
|
15
20
|
def to_hash
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class DocumentRangeFormattingParams
|
|
4
|
+
class DocumentRangeFormattingParams
|
|
5
5
|
def initialize(work_done_token: nil, text_document:, range:, options:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
@@ -13,6 +13,14 @@ module LanguageServer
|
|
|
13
13
|
@attributes.freeze
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
#
|
|
17
|
+
# An optional token that a server can use to report work done progress.
|
|
18
|
+
#
|
|
19
|
+
# @return [ProgressToken]
|
|
20
|
+
def work_done_token
|
|
21
|
+
attributes.fetch(:workDoneToken)
|
|
22
|
+
end
|
|
23
|
+
|
|
16
24
|
#
|
|
17
25
|
# The document to format.
|
|
18
26
|
#
|