language_server-protocol 3.16.0.2 → 3.17.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/lib/language_server/protocol/constant/code_action_kind.rb +8 -0
- data/lib/language_server/protocol/constant/code_action_trigger_kind.rb +22 -0
- data/lib/language_server/protocol/constant/document_diagnostic_report_kind.rb +21 -0
- data/lib/language_server/protocol/constant/error_codes.rb +33 -2
- data/lib/language_server/protocol/constant/folding_range_kind.rb +24 -0
- data/lib/language_server/protocol/constant/{initialize_error.rb → initialize_error_codes.rb} +4 -4
- data/lib/language_server/protocol/constant/inlay_hint_kind.rb +19 -0
- data/lib/language_server/protocol/constant/moniker_kind.rb +24 -0
- data/lib/language_server/protocol/constant/notebook_cell_kind.rb +19 -0
- data/lib/language_server/protocol/constant/position_encoding_kind.rb +32 -0
- data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +1 -1
- data/lib/language_server/protocol/constant/semantic_token_modifiers.rb +18 -0
- data/lib/language_server/protocol/constant/semantic_token_types.rb +35 -0
- data/lib/language_server/protocol/constant/uniqueness_level.rb +31 -0
- data/lib/language_server/protocol/constant.rb +22 -2
- data/lib/language_server/protocol/interface/{apply_workspace_edit_response.rb → apply_workspace_edit_result.rb} +2 -2
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +1 -1
- data/lib/language_server/protocol/interface/client_capabilities.rb +13 -4
- data/lib/language_server/protocol/interface/code_action.rb +1 -1
- data/lib/language_server/protocol/interface/code_action_context.rb +10 -1
- data/lib/language_server/protocol/interface/code_lens.rb +1 -1
- data/lib/language_server/protocol/interface/color_presentation.rb +1 -1
- data/lib/language_server/protocol/interface/command.rb +1 -1
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +23 -3
- data/lib/language_server/protocol/interface/completion_item.rb +41 -9
- data/lib/language_server/protocol/interface/completion_item_label_details.rb +49 -0
- data/lib/language_server/protocol/interface/completion_list.rb +24 -2
- data/lib/language_server/protocol/interface/completion_options.rb +11 -1
- data/lib/language_server/protocol/interface/completion_registration_options.rb +11 -1
- data/lib/language_server/protocol/interface/create_file.rb +1 -1
- data/lib/language_server/protocol/interface/delete_file.rb +1 -1
- data/lib/language_server/protocol/interface/diagnostic_client_capabilities.rb +49 -0
- data/lib/language_server/protocol/interface/diagnostic_options.rb +64 -0
- data/lib/language_server/protocol/interface/diagnostic_registration_options.rb +84 -0
- data/lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb +33 -0
- data/lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/did_change_configuration_params.rb +1 -1
- data/lib/language_server/protocol/interface/did_change_notebook_document_params.rb +56 -0
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +11 -1
- data/lib/language_server/protocol/interface/did_close_notebook_document_params.rb +46 -0
- data/lib/language_server/protocol/interface/did_open_notebook_document_params.rb +46 -0
- data/lib/language_server/protocol/interface/did_save_notebook_document_params.rb +36 -0
- data/lib/language_server/protocol/interface/document_diagnostic_params.rb +73 -0
- data/lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb +33 -0
- data/lib/language_server/protocol/interface/document_link.rb +1 -1
- data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +9 -4
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_symbol.rb +1 -1
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/execute_command_params.rb +1 -1
- data/lib/language_server/protocol/interface/execution_summary.rb +45 -0
- data/lib/language_server/protocol/interface/file_system_watcher.rb +3 -14
- data/lib/language_server/protocol/interface/folding_range.rb +12 -1
- data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +19 -1
- data/lib/language_server/protocol/interface/full_document_diagnostic_report.rb +56 -0
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/hover_result.rb +30 -0
- data/lib/language_server/protocol/interface/initialize_error.rb +0 -3
- data/lib/language_server/protocol/interface/initialize_params.rb +1 -1
- data/lib/language_server/protocol/interface/inlay_hint.rb +122 -0
- data/lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb +46 -0
- data/lib/language_server/protocol/interface/inlay_hint_label_part.rb +79 -0
- data/lib/language_server/protocol/interface/inlay_hint_options.rb +43 -0
- data/lib/language_server/protocol/interface/inlay_hint_params.rb +54 -0
- data/lib/language_server/protocol/interface/inlay_hint_registration_options.rb +63 -0
- data/lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/inline_value_client_capabilities.rb +37 -0
- data/lib/language_server/protocol/interface/inline_value_context.rb +44 -0
- data/lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb +52 -0
- data/lib/language_server/protocol/interface/inline_value_options.rb +33 -0
- data/lib/language_server/protocol/interface/inline_value_params.rb +64 -0
- data/lib/language_server/protocol/interface/inline_value_registration_options.rb +53 -0
- data/lib/language_server/protocol/interface/inline_value_text.rb +45 -0
- data/lib/language_server/protocol/interface/inline_value_variable_lookup.rb +61 -0
- data/lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/linked_editing_ranges.rb +5 -4
- data/lib/language_server/protocol/interface/location_link.rb +1 -1
- data/lib/language_server/protocol/interface/notebook_cell.rb +69 -0
- data/lib/language_server/protocol/interface/notebook_cell_array_change.rb +55 -0
- data/lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb +52 -0
- data/lib/language_server/protocol/interface/notebook_document.rb +74 -0
- data/lib/language_server/protocol/interface/notebook_document_change_event.rb +45 -0
- data/lib/language_server/protocol/interface/notebook_document_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/notebook_document_filter.rb +79 -0
- data/lib/language_server/protocol/interface/notebook_document_identifier.rb +36 -0
- data/lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb +48 -0
- data/lib/language_server/protocol/interface/notebook_document_sync_options.rb +56 -0
- data/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb +56 -0
- data/lib/language_server/protocol/interface/position.rb +2 -3
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +10 -1
- data/lib/language_server/protocol/interface/previous_result_id.rb +46 -0
- data/lib/language_server/protocol/interface/registration.rb +1 -1
- data/lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb +69 -0
- data/lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb +62 -0
- data/lib/language_server/protocol/interface/relative_pattern.rb +48 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/rename_file.rb +1 -1
- data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +29 -1
- data/lib/language_server/protocol/interface/server_capabilities.rb +62 -2
- data/lib/language_server/protocol/interface/signature_help.rb +2 -2
- data/lib/language_server/protocol/interface/symbol_information.rb +1 -1
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +37 -1
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_sync_options.rb +2 -0
- data/lib/language_server/protocol/interface/type_hierarchy_item.rb +102 -0
- data/lib/language_server/protocol/interface/type_hierarchy_options.rb +30 -0
- data/lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb +51 -0
- data/lib/language_server/protocol/interface/type_hierarchy_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb +49 -0
- data/lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb +49 -0
- data/lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb +50 -0
- data/lib/language_server/protocol/interface/{markdown_client_capabilities.rb → versioned_notebook_document_identifier.rb} +12 -12
- data/lib/language_server/protocol/interface/work_done_progress_report.rb +1 -1
- data/lib/language_server/protocol/interface/workspace_diagnostic_params.rb +65 -0
- data/lib/language_server/protocol/interface/workspace_diagnostic_report.rb +33 -0
- data/lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb +33 -0
- data/lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb +75 -0
- data/lib/language_server/protocol/interface/workspace_symbol.rb +89 -0
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +14 -3
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +11 -1
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +11 -1
- data/lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb +68 -0
- data/lib/language_server/protocol/interface.rb +124 -4
- data/lib/language_server/protocol/transport/io/reader.rb +7 -24
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +75 -20
@@ -5,7 +5,7 @@ module LanguageServer
|
|
5
5
|
# Text document specific client capabilities.
|
6
6
|
#
|
7
7
|
class TextDocumentClientCapabilities
|
8
|
-
def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, publish_diagnostics: nil, folding_range: nil, selection_range: nil, linked_editing_range: nil, call_hierarchy: nil, semantic_tokens: nil, moniker: nil)
|
8
|
+
def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, references: nil, document_highlight: nil, document_symbol: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, rename: nil, publish_diagnostics: nil, folding_range: nil, selection_range: nil, linked_editing_range: nil, call_hierarchy: nil, semantic_tokens: nil, moniker: nil, type_hierarchy: nil, inline_value: nil, inlay_hint: nil, diagnostic: nil)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
11
|
@attributes[:synchronization] = synchronization if synchronization
|
@@ -34,6 +34,10 @@ module LanguageServer
|
|
34
34
|
@attributes[:callHierarchy] = call_hierarchy if call_hierarchy
|
35
35
|
@attributes[:semanticTokens] = semantic_tokens if semantic_tokens
|
36
36
|
@attributes[:moniker] = moniker if moniker
|
37
|
+
@attributes[:typeHierarchy] = type_hierarchy if type_hierarchy
|
38
|
+
@attributes[:inlineValue] = inline_value if inline_value
|
39
|
+
@attributes[:inlayHint] = inlay_hint if inlay_hint
|
40
|
+
@attributes[:diagnostic] = diagnostic if diagnostic
|
37
41
|
|
38
42
|
@attributes.freeze
|
39
43
|
end
|
@@ -246,6 +250,38 @@ module LanguageServer
|
|
246
250
|
attributes.fetch(:moniker)
|
247
251
|
end
|
248
252
|
|
253
|
+
#
|
254
|
+
# Capabilities specific to the various type hierarchy requests.
|
255
|
+
#
|
256
|
+
# @return [TypeHierarchyClientCapabilities]
|
257
|
+
def type_hierarchy
|
258
|
+
attributes.fetch(:typeHierarchy)
|
259
|
+
end
|
260
|
+
|
261
|
+
#
|
262
|
+
# Capabilities specific to the `textDocument/inlineValue` request.
|
263
|
+
#
|
264
|
+
# @return [InlineValueClientCapabilities]
|
265
|
+
def inline_value
|
266
|
+
attributes.fetch(:inlineValue)
|
267
|
+
end
|
268
|
+
|
269
|
+
#
|
270
|
+
# Capabilities specific to the `textDocument/inlayHint` request.
|
271
|
+
#
|
272
|
+
# @return [InlayHintClientCapabilities]
|
273
|
+
def inlay_hint
|
274
|
+
attributes.fetch(:inlayHint)
|
275
|
+
end
|
276
|
+
|
277
|
+
#
|
278
|
+
# Capabilities specific to the diagnostic pull model.
|
279
|
+
#
|
280
|
+
# @return [DiagnosticClientCapabilities]
|
281
|
+
def diagnostic
|
282
|
+
attributes.fetch(:diagnostic)
|
283
|
+
end
|
284
|
+
|
249
285
|
attr_reader :attributes
|
250
286
|
|
251
287
|
def to_hash
|
@@ -2,8 +2,8 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# An event describing a change to a text document. If
|
6
|
-
#
|
5
|
+
# An event describing a change to a text document. If only a text is provided
|
6
|
+
# it is considered to be the full content of the document.
|
7
7
|
#
|
8
8
|
class TextDocumentContentChangeEvent
|
9
9
|
def initialize(range: nil, range_length: nil, text:)
|
@@ -16,6 +16,8 @@ module LanguageServer
|
|
16
16
|
|
17
17
|
#
|
18
18
|
# Open and close notifications are sent to the server. If omitted open
|
19
|
+
# close notifications should not be sent.
|
20
|
+
# Open and close notifications are sent to the server. If omitted open
|
19
21
|
# close notification should not be sent.
|
20
22
|
#
|
21
23
|
# @return [boolean]
|
@@ -0,0 +1,102 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class TypeHierarchyItem
|
5
|
+
def initialize(name:, kind:, tags: nil, detail: nil, uri:, range:, selection_range:, data: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:name] = name
|
9
|
+
@attributes[:kind] = kind
|
10
|
+
@attributes[:tags] = tags if tags
|
11
|
+
@attributes[:detail] = detail if detail
|
12
|
+
@attributes[:uri] = uri
|
13
|
+
@attributes[:range] = range
|
14
|
+
@attributes[:selectionRange] = selection_range
|
15
|
+
@attributes[:data] = data if data
|
16
|
+
|
17
|
+
@attributes.freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# The name of this item.
|
22
|
+
#
|
23
|
+
# @return [string]
|
24
|
+
def name
|
25
|
+
attributes.fetch(:name)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# The kind of this item.
|
30
|
+
#
|
31
|
+
# @return [SymbolKind]
|
32
|
+
def kind
|
33
|
+
attributes.fetch(:kind)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# Tags for this item.
|
38
|
+
#
|
39
|
+
# @return [1[]]
|
40
|
+
def tags
|
41
|
+
attributes.fetch(:tags)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# More detail for this item, e.g. the signature of a function.
|
46
|
+
#
|
47
|
+
# @return [string]
|
48
|
+
def detail
|
49
|
+
attributes.fetch(:detail)
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# The resource identifier of this item.
|
54
|
+
#
|
55
|
+
# @return [string]
|
56
|
+
def uri
|
57
|
+
attributes.fetch(:uri)
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# The range enclosing this symbol not including leading/trailing whitespace
|
62
|
+
# but everything else, e.g. comments and code.
|
63
|
+
#
|
64
|
+
# @return [Range]
|
65
|
+
def range
|
66
|
+
attributes.fetch(:range)
|
67
|
+
end
|
68
|
+
|
69
|
+
#
|
70
|
+
# The range that should be selected and revealed when this symbol is being
|
71
|
+
# picked, e.g. the name of a function. Must be contained by the
|
72
|
+
# [`range`](#TypeHierarchyItem.range).
|
73
|
+
#
|
74
|
+
# @return [Range]
|
75
|
+
def selection_range
|
76
|
+
attributes.fetch(:selectionRange)
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# A data entry field that is preserved between a type hierarchy prepare and
|
81
|
+
# supertypes or subtypes requests. It could also be used to identify the
|
82
|
+
# type hierarchy in the server, helping improve the performance on
|
83
|
+
# resolving supertypes and subtypes.
|
84
|
+
#
|
85
|
+
# @return [LSPAny]
|
86
|
+
def data
|
87
|
+
attributes.fetch(:data)
|
88
|
+
end
|
89
|
+
|
90
|
+
attr_reader :attributes
|
91
|
+
|
92
|
+
def to_hash
|
93
|
+
attributes
|
94
|
+
end
|
95
|
+
|
96
|
+
def to_json(*args)
|
97
|
+
to_hash.to_json(*args)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class TypeHierarchyOptions
|
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
|
+
# @return [boolean]
|
14
|
+
def work_done_progress
|
15
|
+
attributes.fetch(:workDoneProgress)
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_reader :attributes
|
19
|
+
|
20
|
+
def to_hash
|
21
|
+
attributes
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_json(*args)
|
25
|
+
to_hash.to_json(*args)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class TypeHierarchyPrepareParams
|
5
|
+
def initialize(text_document:, position:, work_done_token: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:textDocument] = text_document
|
9
|
+
@attributes[:position] = position
|
10
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
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
|
+
|
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,50 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class TypeHierarchyRegistrationOptions
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, id: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:documentSelector] = document_selector
|
9
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
10
|
+
@attributes[:id] = id if id
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
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
|
+
|
38
|
+
attr_reader :attributes
|
39
|
+
|
40
|
+
def to_hash
|
41
|
+
attributes
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_json(*args)
|
45
|
+
to_hash.to_json(*args)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class TypeHierarchySubtypesParams
|
5
|
+
def initialize(work_done_token: nil, partial_result_token: nil, item:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
10
|
+
@attributes[:item] = item
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
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
|
+
|
32
|
+
# @return [TypeHierarchyItem]
|
33
|
+
def item
|
34
|
+
attributes.fetch(:item)
|
35
|
+
end
|
36
|
+
|
37
|
+
attr_reader :attributes
|
38
|
+
|
39
|
+
def to_hash
|
40
|
+
attributes
|
41
|
+
end
|
42
|
+
|
43
|
+
def to_json(*args)
|
44
|
+
to_hash.to_json(*args)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class TypeHierarchySupertypesParams
|
5
|
+
def initialize(work_done_token: nil, partial_result_token: nil, item:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
10
|
+
@attributes[:item] = item
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
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
|
+
|
32
|
+
# @return [TypeHierarchyItem]
|
33
|
+
def item
|
34
|
+
attributes.fetch(:item)
|
35
|
+
end
|
36
|
+
|
37
|
+
attr_reader :attributes
|
38
|
+
|
39
|
+
def to_hash
|
40
|
+
attributes
|
41
|
+
end
|
42
|
+
|
43
|
+
def to_json(*args)
|
44
|
+
to_hash.to_json(*args)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A diagnostic report indicating that the last returned
|
6
|
+
# report is still accurate.
|
7
|
+
#
|
8
|
+
class UnchangedDocumentDiagnosticReport
|
9
|
+
def initialize(kind:, result_id:)
|
10
|
+
@attributes = {}
|
11
|
+
|
12
|
+
@attributes[:kind] = kind
|
13
|
+
@attributes[:resultId] = result_id
|
14
|
+
|
15
|
+
@attributes.freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
#
|
19
|
+
# A document diagnostic report indicating
|
20
|
+
# no changes to the last result. A server can
|
21
|
+
# only return `unchanged` if result ids are
|
22
|
+
# provided.
|
23
|
+
#
|
24
|
+
# @return [any]
|
25
|
+
def kind
|
26
|
+
attributes.fetch(:kind)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# A result id which will be sent on the next
|
31
|
+
# diagnostic request for the same document.
|
32
|
+
#
|
33
|
+
# @return [string]
|
34
|
+
def result_id
|
35
|
+
attributes.fetch(:resultId)
|
36
|
+
end
|
37
|
+
|
38
|
+
attr_reader :attributes
|
39
|
+
|
40
|
+
def to_hash
|
41
|
+
attributes
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_json(*args)
|
45
|
+
to_hash.to_json(*args)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -2,32 +2,32 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
#
|
5
|
+
# A versioned notebook document identifier.
|
6
6
|
#
|
7
|
-
class
|
8
|
-
def initialize(
|
7
|
+
class VersionedNotebookDocumentIdentifier
|
8
|
+
def initialize(version:, uri:)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
|
-
@attributes[:
|
12
|
-
@attributes[:
|
11
|
+
@attributes[:version] = version
|
12
|
+
@attributes[:uri] = uri
|
13
13
|
|
14
14
|
@attributes.freeze
|
15
15
|
end
|
16
16
|
|
17
17
|
#
|
18
|
-
# The
|
18
|
+
# The version number of this notebook document.
|
19
19
|
#
|
20
|
-
# @return [
|
21
|
-
def
|
22
|
-
attributes.fetch(:
|
20
|
+
# @return [number]
|
21
|
+
def version
|
22
|
+
attributes.fetch(:version)
|
23
23
|
end
|
24
24
|
|
25
25
|
#
|
26
|
-
# The
|
26
|
+
# The notebook document's URI.
|
27
27
|
#
|
28
28
|
# @return [string]
|
29
|
-
def
|
30
|
-
attributes.fetch(:
|
29
|
+
def uri
|
30
|
+
attributes.fetch(:uri)
|
31
31
|
end
|
32
32
|
|
33
33
|
attr_reader :attributes
|
@@ -20,7 +20,7 @@ module LanguageServer
|
|
20
20
|
|
21
21
|
#
|
22
22
|
# Controls enablement state of a cancel button. This property is only valid
|
23
|
-
# if a cancel button got requested in the `
|
23
|
+
# if a cancel button got requested in the `WorkDoneProgressBegin` payload.
|
24
24
|
#
|
25
25
|
# Clients that don't support cancellation or don't support control the
|
26
26
|
# button's enablement state are allowed to ignore the setting.
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Parameters of the workspace diagnostic request.
|
6
|
+
#
|
7
|
+
class WorkspaceDiagnosticParams
|
8
|
+
def initialize(work_done_token: nil, partial_result_token: nil, identifier: nil, previous_result_ids:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
12
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
13
|
+
@attributes[:identifier] = identifier if identifier
|
14
|
+
@attributes[:previousResultIds] = previous_result_ids
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# An optional token that a server can use to report work done progress.
|
21
|
+
#
|
22
|
+
# @return [ProgressToken]
|
23
|
+
def work_done_token
|
24
|
+
attributes.fetch(:workDoneToken)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# An optional token that a server can use to report partial results (e.g.
|
29
|
+
# streaming) to the client.
|
30
|
+
#
|
31
|
+
# @return [ProgressToken]
|
32
|
+
def partial_result_token
|
33
|
+
attributes.fetch(:partialResultToken)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# The additional identifier provided during registration.
|
38
|
+
#
|
39
|
+
# @return [string]
|
40
|
+
def identifier
|
41
|
+
attributes.fetch(:identifier)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The currently known diagnostic reports with their
|
46
|
+
# previous result ids.
|
47
|
+
#
|
48
|
+
# @return [PreviousResultId[]]
|
49
|
+
def previous_result_ids
|
50
|
+
attributes.fetch(:previousResultIds)
|
51
|
+
end
|
52
|
+
|
53
|
+
attr_reader :attributes
|
54
|
+
|
55
|
+
def to_hash
|
56
|
+
attributes
|
57
|
+
end
|
58
|
+
|
59
|
+
def to_json(*args)
|
60
|
+
to_hash.to_json(*args)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A workspace diagnostic report.
|
6
|
+
#
|
7
|
+
class WorkspaceDiagnosticReport
|
8
|
+
def initialize(items:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:items] = items
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [WorkspaceDocumentDiagnosticReport[]]
|
17
|
+
def items
|
18
|
+
attributes.fetch(:items)
|
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,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A partial result for a workspace diagnostic report.
|
6
|
+
#
|
7
|
+
class WorkspaceDiagnosticReportPartialResult
|
8
|
+
def initialize(items:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:items] = items
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [WorkspaceDocumentDiagnosticReport[]]
|
17
|
+
def items
|
18
|
+
attributes.fetch(:items)
|
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
|