language_server-protocol 3.16.0.0 → 3.16.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3ec18ff38c90b4514892b8cf1994ebd4d0b6b67ac552e6c7b0b809cc70b0eb6
|
4
|
+
data.tar.gz: 04aa9a94aefae834792332a1287aa3e31861a4bd4e77b5348bf09e714f3d03c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05ac0882550bbf58993ddb5d656163d612385e51f093ec2c6d8c410e35df8462ca7fd2a8205668089f991bcf0867060ddbe36de7a6aebd0442494be70e04d13b
|
7
|
+
data.tar.gz: 0ff19e07d9f55793106a2d925f5076067e4c13af2bea679d89fba19f42477526f08bc45c5191b59be86c2115711077743756a73df216443ec7ce82aa06db27c7
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# A special text edit with an additional change annotation.
|
6
6
|
#
|
7
|
-
class AnnotatedTextEdit
|
7
|
+
class AnnotatedTextEdit
|
8
8
|
def initialize(range:, new_text:, annotation_id:)
|
9
9
|
@attributes = {}
|
10
10
|
|
@@ -15,6 +15,24 @@ module LanguageServer
|
|
15
15
|
@attributes.freeze
|
16
16
|
end
|
17
17
|
|
18
|
+
#
|
19
|
+
# The range of the text document to be manipulated. To insert
|
20
|
+
# text into a document create a range where start === end.
|
21
|
+
#
|
22
|
+
# @return [Range]
|
23
|
+
def range
|
24
|
+
attributes.fetch(:range)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# The string to be inserted. For delete operations use an
|
29
|
+
# empty string.
|
30
|
+
#
|
31
|
+
# @return [string]
|
32
|
+
def new_text
|
33
|
+
attributes.fetch(:newText)
|
34
|
+
end
|
35
|
+
|
18
36
|
#
|
19
37
|
# The actual annotation identifier.
|
20
38
|
#
|
@@ -1,16 +1,34 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CallHierarchyIncomingCallsParams
|
5
|
-
def initialize(partial_result_token: nil, item:)
|
4
|
+
class CallHierarchyIncomingCallsParams
|
5
|
+
def initialize(work_done_token: nil, partial_result_token: nil, item:)
|
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[:item] = item
|
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
|
# @return [CallHierarchyItem]
|
15
33
|
def item
|
16
34
|
attributes.fetch(:item)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CallHierarchyOptions
|
4
|
+
class CallHierarchyOptions
|
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,16 +1,34 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CallHierarchyOutgoingCallsParams
|
5
|
-
def initialize(partial_result_token: nil, item:)
|
4
|
+
class CallHierarchyOutgoingCallsParams
|
5
|
+
def initialize(work_done_token: nil, partial_result_token: nil, item:)
|
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[:item] = item
|
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
|
# @return [CallHierarchyItem]
|
15
33
|
def item
|
16
34
|
attributes.fetch(:item)
|
@@ -1,15 +1,41 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CallHierarchyPrepareParams
|
5
|
-
def initialize(work_done_token: nil)
|
4
|
+
class CallHierarchyPrepareParams
|
5
|
+
def initialize(text_document:, position:, work_done_token: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:textDocument] = text_document
|
9
|
+
@attributes[:position] = position
|
8
10
|
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
11
|
|
10
12
|
@attributes.freeze
|
11
13
|
end
|
12
14
|
|
15
|
+
#
|
16
|
+
# The text document.
|
17
|
+
#
|
18
|
+
# @return [TextDocumentIdentifier]
|
19
|
+
def text_document
|
20
|
+
attributes.fetch(:textDocument)
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# The position inside the text document.
|
25
|
+
#
|
26
|
+
# @return [Position]
|
27
|
+
def position
|
28
|
+
attributes.fetch(:position)
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# An optional token that a server can use to report work done progress.
|
33
|
+
#
|
34
|
+
# @return [ProgressToken]
|
35
|
+
def work_done_token
|
36
|
+
attributes.fetch(:workDoneToken)
|
37
|
+
end
|
38
|
+
|
13
39
|
attr_reader :attributes
|
14
40
|
|
15
41
|
def to_hash
|
@@ -1,15 +1,40 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CallHierarchyRegistrationOptions
|
5
|
-
def initialize(id: nil)
|
4
|
+
class CallHierarchyRegistrationOptions
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, id: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:documentSelector] = document_selector
|
9
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
8
10
|
@attributes[:id] = id if id
|
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
|
+
# @return [boolean]
|
25
|
+
def work_done_progress
|
26
|
+
attributes.fetch(:workDoneProgress)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# The id used to register the request. The id can be used to deregister
|
31
|
+
# the request again. See also Registration#id.
|
32
|
+
#
|
33
|
+
# @return [string]
|
34
|
+
def id
|
35
|
+
attributes.fetch(:id)
|
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 CodeActionOptions
|
4
|
+
class CodeActionOptions
|
5
5
|
def initialize(work_done_progress: nil, code_action_kinds: nil, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
@@ -12,6 +12,11 @@ module LanguageServer
|
|
12
12
|
@attributes.freeze
|
13
13
|
end
|
14
14
|
|
15
|
+
# @return [boolean]
|
16
|
+
def work_done_progress
|
17
|
+
attributes.fetch(:workDoneProgress)
|
18
|
+
end
|
19
|
+
|
15
20
|
#
|
16
21
|
# CodeActionKinds that this server may return.
|
17
22
|
#
|
@@ -4,10 +4,11 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# Params for the CodeActionRequest
|
6
6
|
#
|
7
|
-
class CodeActionParams
|
8
|
-
def initialize(partial_result_token: nil, text_document:, range:, context:)
|
7
|
+
class CodeActionParams
|
8
|
+
def initialize(work_done_token: nil, partial_result_token: nil, text_document:, range:, context:)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
11
12
|
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
12
13
|
@attributes[:textDocument] = text_document
|
13
14
|
@attributes[:range] = range
|
@@ -16,6 +17,23 @@ module LanguageServer
|
|
16
17
|
@attributes.freeze
|
17
18
|
end
|
18
19
|
|
20
|
+
#
|
21
|
+
# An optional token that a server can use to report work done progress.
|
22
|
+
#
|
23
|
+
# @return [ProgressToken]
|
24
|
+
def work_done_token
|
25
|
+
attributes.fetch(:workDoneToken)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# An optional token that a server can use to report partial results (e.g.
|
30
|
+
# streaming) to the client.
|
31
|
+
#
|
32
|
+
# @return [ProgressToken]
|
33
|
+
def partial_result_token
|
34
|
+
attributes.fetch(:partialResultToken)
|
35
|
+
end
|
36
|
+
|
19
37
|
#
|
20
38
|
# The document in which the command was invoked.
|
21
39
|
#
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CodeActionRegistrationOptions
|
5
|
-
def initialize(work_done_progress: nil, code_action_kinds: nil, resolve_provider: nil)
|
4
|
+
class CodeActionRegistrationOptions
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, code_action_kinds: 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[:codeActionKinds] = code_action_kinds if code_action_kinds
|
10
11
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
@@ -12,6 +13,40 @@ module LanguageServer
|
|
12
13
|
@attributes.freeze
|
13
14
|
end
|
14
15
|
|
16
|
+
#
|
17
|
+
# A document selector to identify the scope of the registration. If set to
|
18
|
+
# null the document selector provided on the client side will be used.
|
19
|
+
#
|
20
|
+
# @return [DocumentSelector]
|
21
|
+
def document_selector
|
22
|
+
attributes.fetch(:documentSelector)
|
23
|
+
end
|
24
|
+
|
25
|
+
# @return [boolean]
|
26
|
+
def work_done_progress
|
27
|
+
attributes.fetch(:workDoneProgress)
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# CodeActionKinds that this server may return.
|
32
|
+
#
|
33
|
+
# The list of kinds may be generic, such as `CodeActionKind.Refactor`,
|
34
|
+
# or the server may list out every specific kind they provide.
|
35
|
+
#
|
36
|
+
# @return [string[]]
|
37
|
+
def code_action_kinds
|
38
|
+
attributes.fetch(:codeActionKinds)
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# The server provides support to resolve additional
|
43
|
+
# information for a code action.
|
44
|
+
#
|
45
|
+
# @return [boolean]
|
46
|
+
def resolve_provider
|
47
|
+
attributes.fetch(:resolveProvider)
|
48
|
+
end
|
49
|
+
|
15
50
|
attr_reader :attributes
|
16
51
|
|
17
52
|
def to_hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CodeLensOptions
|
4
|
+
class CodeLensOptions
|
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
|
# Code lens has 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 CodeLensParams
|
5
|
-
def initialize(partial_result_token: nil, text_document:)
|
4
|
+
class CodeLensParams
|
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 request code lens for.
|
16
34
|
#
|
@@ -1,16 +1,39 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class CodeLensRegistrationOptions
|
5
|
-
def initialize(work_done_progress: nil, resolve_provider: nil)
|
4
|
+
class CodeLensRegistrationOptions
|
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
|
+
# Code lens has 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
|