language_server-protocol 3.14.0.2 → 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/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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class ImplementationParams < PartialResultParams
|
|
5
|
+
def initialize(partial_result_token: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
9
|
+
|
|
10
|
+
@attributes.freeze
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attr_reader :attributes
|
|
14
|
+
|
|
15
|
+
def to_hash
|
|
16
|
+
attributes
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_json(*args)
|
|
20
|
+
to_hash.to_json(*args)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class ImplementationRegistrationOptions < StaticRegistrationOptions
|
|
5
|
+
def initialize(id: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:id] = id if id
|
|
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,11 +1,13 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class InitializeParams
|
|
5
|
-
def initialize(process_id:, root_path: nil, root_uri:, initialization_options: nil, capabilities:, trace: nil, workspace_folders: nil)
|
|
4
|
+
class InitializeParams < WorkDoneProgressParams
|
|
5
|
+
def initialize(work_done_token: nil, process_id:, client_info: nil, root_path: nil, root_uri:, initialization_options: nil, capabilities:, trace: nil, workspace_folders: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
|
8
9
|
@attributes[:processId] = process_id
|
|
10
|
+
@attributes[:clientInfo] = client_info if client_info
|
|
9
11
|
@attributes[:rootPath] = root_path if root_path
|
|
10
12
|
@attributes[:rootUri] = root_uri
|
|
11
13
|
@attributes[:initializationOptions] = initialization_options if initialization_options
|
|
@@ -26,6 +28,14 @@ module LanguageServer
|
|
|
26
28
|
attributes.fetch(:processId)
|
|
27
29
|
end
|
|
28
30
|
|
|
31
|
+
#
|
|
32
|
+
# Information about the client
|
|
33
|
+
#
|
|
34
|
+
# @return [{ name: string; version?: string; }]
|
|
35
|
+
def client_info
|
|
36
|
+
attributes.fetch(:clientInfo)
|
|
37
|
+
end
|
|
38
|
+
|
|
29
39
|
#
|
|
30
40
|
# The rootPath of the workspace. Is null
|
|
31
41
|
# if no folder is open.
|
|
@@ -75,8 +85,6 @@ module LanguageServer
|
|
|
75
85
|
# It can be `null` if the client supports workspace folders but none are
|
|
76
86
|
# configured.
|
|
77
87
|
#
|
|
78
|
-
# Since 3.6.0
|
|
79
|
-
#
|
|
80
88
|
# @return [WorkspaceFolder[]]
|
|
81
89
|
def workspace_folders
|
|
82
90
|
attributes.fetch(:workspaceFolders)
|
|
@@ -2,10 +2,11 @@ module LanguageServer
|
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
4
|
class InitializeResult
|
|
5
|
-
def initialize(capabilities:)
|
|
5
|
+
def initialize(capabilities:, server_info: nil)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
8
|
@attributes[:capabilities] = capabilities
|
|
9
|
+
@attributes[:serverInfo] = server_info if server_info
|
|
9
10
|
|
|
10
11
|
@attributes.freeze
|
|
11
12
|
end
|
|
@@ -18,6 +19,14 @@ module LanguageServer
|
|
|
18
19
|
attributes.fetch(:capabilities)
|
|
19
20
|
end
|
|
20
21
|
|
|
22
|
+
#
|
|
23
|
+
# Information about the server.
|
|
24
|
+
#
|
|
25
|
+
# @return [{ name: string; version?: string; }]
|
|
26
|
+
def server_info
|
|
27
|
+
attributes.fetch(:serverInfo)
|
|
28
|
+
end
|
|
29
|
+
|
|
21
30
|
attr_reader :attributes
|
|
22
31
|
|
|
23
32
|
def to_hash
|
|
@@ -2,13 +2,13 @@ module LanguageServer
|
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
4
|
class LocationLink
|
|
5
|
-
def initialize(origin_selection_range: nil, target_uri:, target_range:, target_selection_range:
|
|
5
|
+
def initialize(origin_selection_range: nil, target_uri:, target_range:, target_selection_range:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
8
|
@attributes[:originSelectionRange] = origin_selection_range if origin_selection_range
|
|
9
9
|
@attributes[:targetUri] = target_uri
|
|
10
10
|
@attributes[:targetRange] = target_range
|
|
11
|
-
@attributes[:targetSelectionRange] = target_selection_range
|
|
11
|
+
@attributes[:targetSelectionRange] = target_selection_range
|
|
12
12
|
|
|
13
13
|
@attributes.freeze
|
|
14
14
|
end
|
|
@@ -33,7 +33,9 @@ module LanguageServer
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
#
|
|
36
|
-
# The full target range of this link.
|
|
36
|
+
# The full target range of this link. If the target for example is a symbol then target range is the
|
|
37
|
+
# range enclosing this symbol not including leading/trailing whitespace but everything else
|
|
38
|
+
# like comments. This information is typically used to highlight the range in the editor.
|
|
37
39
|
#
|
|
38
40
|
# @return [Range]
|
|
39
41
|
def target_range
|
|
@@ -41,7 +43,8 @@ module LanguageServer
|
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
#
|
|
44
|
-
# The
|
|
46
|
+
# The range that should be selected and revealed when this link is being followed, e.g the name of a function.
|
|
47
|
+
# Must be contained by the the `targetRange`. See also `DocumentSymbol#range`
|
|
45
48
|
#
|
|
46
49
|
# @return [Range]
|
|
47
50
|
def target_selection_range
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class PartialResultParams
|
|
5
|
+
def initialize(partial_result_token: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
9
|
+
|
|
10
|
+
@attributes.freeze
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# An optional token that a server can use to report partial results (e.g. streaming) to
|
|
15
|
+
# the client.
|
|
16
|
+
#
|
|
17
|
+
# @return [string | number]
|
|
18
|
+
def partial_result_token
|
|
19
|
+
attributes.fetch(:partialResultToken)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
attr_reader :attributes
|
|
23
|
+
|
|
24
|
+
def to_hash
|
|
25
|
+
attributes
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def to_json(*args)
|
|
29
|
+
to_hash.to_json(*args)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class PrepareRenameParams < TextDocumentPositionParams
|
|
5
|
+
def initialize(text_document:, position:)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:textDocument] = text_document
|
|
9
|
+
@attributes[:position] = position
|
|
10
|
+
|
|
11
|
+
@attributes.freeze
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
attr_reader :attributes
|
|
15
|
+
|
|
16
|
+
def to_hash
|
|
17
|
+
attributes
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def to_json(*args)
|
|
21
|
+
to_hash.to_json(*args)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class ProgressParams
|
|
5
|
+
def initialize(token:, value:)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:token] = token
|
|
9
|
+
@attributes[:value] = value
|
|
10
|
+
|
|
11
|
+
@attributes.freeze
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
#
|
|
15
|
+
# The progress token provided by the client or server.
|
|
16
|
+
#
|
|
17
|
+
# @return [string | number]
|
|
18
|
+
def token
|
|
19
|
+
attributes.fetch(:token)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
#
|
|
23
|
+
# The progress data.
|
|
24
|
+
#
|
|
25
|
+
# @return [T]
|
|
26
|
+
def value
|
|
27
|
+
attributes.fetch(:value)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attr_reader :attributes
|
|
31
|
+
|
|
32
|
+
def to_hash
|
|
33
|
+
attributes
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_json(*args)
|
|
37
|
+
to_hash.to_json(*args)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class PublishDiagnosticsClientCapabilities
|
|
5
|
+
def initialize(related_information: nil, tag_support: nil, version_support: nil)
|
|
6
|
+
@attributes = {}
|
|
7
|
+
|
|
8
|
+
@attributes[:relatedInformation] = related_information if related_information
|
|
9
|
+
@attributes[:tagSupport] = tag_support if tag_support
|
|
10
|
+
@attributes[:versionSupport] = version_support if version_support
|
|
11
|
+
|
|
12
|
+
@attributes.freeze
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
#
|
|
16
|
+
# Whether the clients accepts diagnostics with related information.
|
|
17
|
+
#
|
|
18
|
+
# @return [boolean]
|
|
19
|
+
def related_information
|
|
20
|
+
attributes.fetch(:relatedInformation)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
#
|
|
24
|
+
# Client supports the tag property to provide meta data about a diagnostic.
|
|
25
|
+
# Clients supporting tags have to handle unknown tags gracefully.
|
|
26
|
+
#
|
|
27
|
+
# @return [{ valueSet: DiagnosticTag[]; }]
|
|
28
|
+
def tag_support
|
|
29
|
+
attributes.fetch(:tagSupport)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# Whether the client interprets the version property of the
|
|
34
|
+
# `textDocument/publishDiagnostics` notification's parameter.
|
|
35
|
+
#
|
|
36
|
+
# @return [boolean]
|
|
37
|
+
def version_support
|
|
38
|
+
attributes.fetch(:versionSupport)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
attr_reader :attributes
|
|
42
|
+
|
|
43
|
+
def to_hash
|
|
44
|
+
attributes
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def to_json(*args)
|
|
48
|
+
to_hash.to_json(*args)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -2,10 +2,11 @@ module LanguageServer
|
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
4
|
class PublishDiagnosticsParams
|
|
5
|
-
def initialize(uri:, diagnostics:)
|
|
5
|
+
def initialize(uri:, version: nil, diagnostics:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
8
|
@attributes[:uri] = uri
|
|
9
|
+
@attributes[:version] = version if version
|
|
9
10
|
@attributes[:diagnostics] = diagnostics
|
|
10
11
|
|
|
11
12
|
@attributes.freeze
|
|
@@ -19,6 +20,14 @@ module LanguageServer
|
|
|
19
20
|
attributes.fetch(:uri)
|
|
20
21
|
end
|
|
21
22
|
|
|
23
|
+
#
|
|
24
|
+
# Optional the version number of the document the diagnostics are published for.
|
|
25
|
+
#
|
|
26
|
+
# @return [number]
|
|
27
|
+
def version
|
|
28
|
+
attributes.fetch(:version)
|
|
29
|
+
end
|
|
30
|
+
|
|
22
31
|
#
|
|
23
32
|
# An array of diagnostic information items.
|
|
24
33
|
#
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class ReferenceClientCapabilities
|
|
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 references 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 ReferenceOptions < 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,12 +1,11 @@
|
|
|
1
1
|
module LanguageServer
|
|
2
2
|
module Protocol
|
|
3
3
|
module Interface
|
|
4
|
-
class ReferenceParams <
|
|
5
|
-
def initialize(
|
|
4
|
+
class ReferenceParams < PartialResultParams
|
|
5
|
+
def initialize(partial_result_token: nil, context:)
|
|
6
6
|
@attributes = {}
|
|
7
7
|
|
|
8
|
-
@attributes[:
|
|
9
|
-
@attributes[:position] = position
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
|
10
9
|
@attributes[:context] = context
|
|
11
10
|
|
|
12
11
|
@attributes.freeze
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module LanguageServer
|
|
2
|
+
module Protocol
|
|
3
|
+
module Interface
|
|
4
|
+
class ReferenceRegistrationOptions < ReferenceOptions
|
|
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
|