language_server-protocol 3.16.0.2 → 3.17.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/language_server/protocol/constant/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
@@ -0,0 +1,56 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# The params sent in a change notebook document notification.
|
6
|
+
#
|
7
|
+
class DidChangeNotebookDocumentParams
|
8
|
+
def initialize(notebook_document:, change:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:notebookDocument] = notebook_document
|
12
|
+
@attributes[:change] = change
|
13
|
+
|
14
|
+
@attributes.freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# The notebook document that did change. The version number points
|
19
|
+
# to the version after all provided changes have been applied.
|
20
|
+
#
|
21
|
+
# @return [VersionedNotebookDocumentIdentifier]
|
22
|
+
def notebook_document
|
23
|
+
attributes.fetch(:notebookDocument)
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# The actual changes to the notebook document.
|
28
|
+
#
|
29
|
+
# The change describes single state change to the notebook document.
|
30
|
+
# So it moves a notebook document, its cells and its cell text document
|
31
|
+
# contents from state S to S'.
|
32
|
+
#
|
33
|
+
# To mirror the content of a notebook using change events use the
|
34
|
+
# following approach:
|
35
|
+
# - start with the same initial content
|
36
|
+
# - apply the 'notebookDocument/didChange' notifications in the order
|
37
|
+
# you receive them.
|
38
|
+
#
|
39
|
+
# @return [NotebookDocumentChangeEvent]
|
40
|
+
def change
|
41
|
+
attributes.fetch(:change)
|
42
|
+
end
|
43
|
+
|
44
|
+
attr_reader :attributes
|
45
|
+
|
46
|
+
def to_hash
|
47
|
+
attributes
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_json(*args)
|
51
|
+
to_hash.to_json(*args)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -2,10 +2,11 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class DidChangeWatchedFilesClientCapabilities
|
5
|
-
def initialize(dynamic_registration: nil)
|
5
|
+
def initialize(dynamic_registration: nil, relative_pattern_support: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
|
+
@attributes[:relativePatternSupport] = relative_pattern_support if relative_pattern_support
|
9
10
|
|
10
11
|
@attributes.freeze
|
11
12
|
end
|
@@ -20,6 +21,15 @@ module LanguageServer
|
|
20
21
|
attributes.fetch(:dynamicRegistration)
|
21
22
|
end
|
22
23
|
|
24
|
+
#
|
25
|
+
# Whether the client has support for relative patterns
|
26
|
+
# or not.
|
27
|
+
#
|
28
|
+
# @return [boolean]
|
29
|
+
def relative_pattern_support
|
30
|
+
attributes.fetch(:relativePatternSupport)
|
31
|
+
end
|
32
|
+
|
23
33
|
attr_reader :attributes
|
24
34
|
|
25
35
|
def to_hash
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# The params sent in a close notebook document notification.
|
6
|
+
#
|
7
|
+
class DidCloseNotebookDocumentParams
|
8
|
+
def initialize(notebook_document:, cell_text_documents:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:notebookDocument] = notebook_document
|
12
|
+
@attributes[:cellTextDocuments] = cell_text_documents
|
13
|
+
|
14
|
+
@attributes.freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# The notebook document that got closed.
|
19
|
+
#
|
20
|
+
# @return [NotebookDocumentIdentifier]
|
21
|
+
def notebook_document
|
22
|
+
attributes.fetch(:notebookDocument)
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# The text documents that represent the content
|
27
|
+
# of a notebook cell that got closed.
|
28
|
+
#
|
29
|
+
# @return [TextDocumentIdentifier[]]
|
30
|
+
def cell_text_documents
|
31
|
+
attributes.fetch(:cellTextDocuments)
|
32
|
+
end
|
33
|
+
|
34
|
+
attr_reader :attributes
|
35
|
+
|
36
|
+
def to_hash
|
37
|
+
attributes
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_json(*args)
|
41
|
+
to_hash.to_json(*args)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# The params sent in an open notebook document notification.
|
6
|
+
#
|
7
|
+
class DidOpenNotebookDocumentParams
|
8
|
+
def initialize(notebook_document:, cell_text_documents:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:notebookDocument] = notebook_document
|
12
|
+
@attributes[:cellTextDocuments] = cell_text_documents
|
13
|
+
|
14
|
+
@attributes.freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# The notebook document that got opened.
|
19
|
+
#
|
20
|
+
# @return [NotebookDocument]
|
21
|
+
def notebook_document
|
22
|
+
attributes.fetch(:notebookDocument)
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# The text documents that represent the content
|
27
|
+
# of a notebook cell.
|
28
|
+
#
|
29
|
+
# @return [TextDocumentItem[]]
|
30
|
+
def cell_text_documents
|
31
|
+
attributes.fetch(:cellTextDocuments)
|
32
|
+
end
|
33
|
+
|
34
|
+
attr_reader :attributes
|
35
|
+
|
36
|
+
def to_hash
|
37
|
+
attributes
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_json(*args)
|
41
|
+
to_hash.to_json(*args)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# The params sent in a save notebook document notification.
|
6
|
+
#
|
7
|
+
class DidSaveNotebookDocumentParams
|
8
|
+
def initialize(notebook_document:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:notebookDocument] = notebook_document
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# The notebook document that got saved.
|
18
|
+
#
|
19
|
+
# @return [NotebookDocumentIdentifier]
|
20
|
+
def notebook_document
|
21
|
+
attributes.fetch(:notebookDocument)
|
22
|
+
end
|
23
|
+
|
24
|
+
attr_reader :attributes
|
25
|
+
|
26
|
+
def to_hash
|
27
|
+
attributes
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_json(*args)
|
31
|
+
to_hash.to_json(*args)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Parameters of the document diagnostic request.
|
6
|
+
#
|
7
|
+
class DocumentDiagnosticParams
|
8
|
+
def initialize(work_done_token: nil, partial_result_token: nil, text_document:, identifier: nil, previous_result_id: nil)
|
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[:textDocument] = text_document
|
14
|
+
@attributes[:identifier] = identifier if identifier
|
15
|
+
@attributes[:previousResultId] = previous_result_id if previous_result_id
|
16
|
+
|
17
|
+
@attributes.freeze
|
18
|
+
end
|
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
|
+
|
37
|
+
#
|
38
|
+
# The text document.
|
39
|
+
#
|
40
|
+
# @return [TextDocumentIdentifier]
|
41
|
+
def text_document
|
42
|
+
attributes.fetch(:textDocument)
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# The additional identifier provided during registration.
|
47
|
+
#
|
48
|
+
# @return [string]
|
49
|
+
def identifier
|
50
|
+
attributes.fetch(:identifier)
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# The result id of a previous response if provided.
|
55
|
+
#
|
56
|
+
# @return [string]
|
57
|
+
def previous_result_id
|
58
|
+
attributes.fetch(:previousResultId)
|
59
|
+
end
|
60
|
+
|
61
|
+
attr_reader :attributes
|
62
|
+
|
63
|
+
def to_hash
|
64
|
+
attributes
|
65
|
+
end
|
66
|
+
|
67
|
+
def to_json(*args)
|
68
|
+
to_hash.to_json(*args)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A partial result for a document diagnostic report.
|
6
|
+
#
|
7
|
+
class DocumentDiagnosticReportPartialResult
|
8
|
+
def initialize(related_documents:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:relatedDocuments] = related_documents
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }]
|
17
|
+
def related_documents
|
18
|
+
attributes.fetch(:relatedDocuments)
|
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
|
@@ -14,7 +14,7 @@ module LanguageServer
|
|
14
14
|
end
|
15
15
|
|
16
16
|
#
|
17
|
-
# The
|
17
|
+
# The document to format.
|
18
18
|
#
|
19
19
|
# @return [TextDocumentIdentifier]
|
20
20
|
def text_document
|
@@ -22,7 +22,9 @@ module LanguageServer
|
|
22
22
|
end
|
23
23
|
|
24
24
|
#
|
25
|
-
# The position
|
25
|
+
# The position around which the on type formatting should happen.
|
26
|
+
# This is not necessarily the exact position where the character denoted
|
27
|
+
# by the property `ch` got typed.
|
26
28
|
#
|
27
29
|
# @return [Position]
|
28
30
|
def position
|
@@ -30,7 +32,10 @@ module LanguageServer
|
|
30
32
|
end
|
31
33
|
|
32
34
|
#
|
33
|
-
# The character that has been typed
|
35
|
+
# The character that has been typed that triggered the formatting
|
36
|
+
# on type request. That is not necessarily the last character that
|
37
|
+
# got inserted into the document since the client could auto insert
|
38
|
+
# characters as well (e.g. like automatic brace completion).
|
34
39
|
#
|
35
40
|
# @return [string]
|
36
41
|
def ch
|
@@ -38,7 +43,7 @@ module LanguageServer
|
|
38
43
|
end
|
39
44
|
|
40
45
|
#
|
41
|
-
# The
|
46
|
+
# The formatting options.
|
42
47
|
#
|
43
48
|
# @return [FormattingOptions]
|
44
49
|
def options
|
@@ -26,7 +26,7 @@ module LanguageServer
|
|
26
26
|
# Specific capabilities for the `SymbolKind` in the
|
27
27
|
# `textDocument/documentSymbol` request.
|
28
28
|
#
|
29
|
-
# @return [{ valueSet?:
|
29
|
+
# @return [{ valueSet?: SymbolKind[]; }]
|
30
30
|
def symbol_kind
|
31
31
|
attributes.fetch(:symbolKind)
|
32
32
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class ExecutionSummary
|
5
|
+
def initialize(execution_order:, success: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:executionOrder] = execution_order
|
9
|
+
@attributes[:success] = success if success
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# A strict monotonically increasing value
|
16
|
+
# indicating the execution order of a cell
|
17
|
+
# inside a notebook.
|
18
|
+
#
|
19
|
+
# @return [number]
|
20
|
+
def execution_order
|
21
|
+
attributes.fetch(:executionOrder)
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# Whether the execution was successful or
|
26
|
+
# not if known by the client.
|
27
|
+
#
|
28
|
+
# @return [boolean]
|
29
|
+
def success
|
30
|
+
attributes.fetch(:success)
|
31
|
+
end
|
32
|
+
|
33
|
+
attr_reader :attributes
|
34
|
+
|
35
|
+
def to_hash
|
36
|
+
attributes
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_json(*args)
|
40
|
+
to_hash.to_json(*args)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -12,21 +12,10 @@ module LanguageServer
|
|
12
12
|
end
|
13
13
|
|
14
14
|
#
|
15
|
-
# The
|
15
|
+
# The glob pattern to watch. See {@link GlobPattern glob pattern}
|
16
|
+
# for more detail.
|
16
17
|
#
|
17
|
-
#
|
18
|
-
# - `*` to match one or more characters in a path segment
|
19
|
-
# - `?` to match on one character in a path segment
|
20
|
-
# - `**` to match any number of path segments, including none
|
21
|
-
# - `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}`
|
22
|
-
# matches all TypeScript and JavaScript files)
|
23
|
-
# - `[]` to declare a range of characters to match in a path segment
|
24
|
-
# (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
|
25
|
-
# - `[!...]` to negate a range of characters to match in a path segment
|
26
|
-
# (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not
|
27
|
-
# `example.0`)
|
28
|
-
#
|
29
|
-
# @return [string]
|
18
|
+
# @return [GlobPattern]
|
30
19
|
def glob_pattern
|
31
20
|
attributes.fetch(:globPattern)
|
32
21
|
end
|
@@ -7,7 +7,7 @@ module LanguageServer
|
|
7
7
|
# are free to ignore invalid ranges.
|
8
8
|
#
|
9
9
|
class FoldingRange
|
10
|
-
def initialize(start_line:, start_character: nil, end_line:, end_character: nil, kind: nil)
|
10
|
+
def initialize(start_line:, start_character: nil, end_line:, end_character: nil, kind: nil, collapsed_text: nil)
|
11
11
|
@attributes = {}
|
12
12
|
|
13
13
|
@attributes[:startLine] = start_line
|
@@ -15,6 +15,7 @@ module LanguageServer
|
|
15
15
|
@attributes[:endLine] = end_line
|
16
16
|
@attributes[:endCharacter] = end_character if end_character
|
17
17
|
@attributes[:kind] = kind if kind
|
18
|
+
@attributes[:collapsedText] = collapsed_text if collapsed_text
|
18
19
|
|
19
20
|
@attributes.freeze
|
20
21
|
end
|
@@ -68,6 +69,16 @@ module LanguageServer
|
|
68
69
|
attributes.fetch(:kind)
|
69
70
|
end
|
70
71
|
|
72
|
+
#
|
73
|
+
# The text that the client should show when the specified range is
|
74
|
+
# collapsed. If not defined or not supported by the client, a default
|
75
|
+
# will be chosen by the client.
|
76
|
+
#
|
77
|
+
# @return [string]
|
78
|
+
def collapsed_text
|
79
|
+
attributes.fetch(:collapsedText)
|
80
|
+
end
|
81
|
+
|
71
82
|
attr_reader :attributes
|
72
83
|
|
73
84
|
def to_hash
|
@@ -2,12 +2,14 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class FoldingRangeClientCapabilities
|
5
|
-
def initialize(dynamic_registration: nil, range_limit: nil, line_folding_only: nil)
|
5
|
+
def initialize(dynamic_registration: nil, range_limit: nil, line_folding_only: nil, folding_range_kind: nil, folding_range: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
9
|
@attributes[:rangeLimit] = range_limit if range_limit
|
10
10
|
@attributes[:lineFoldingOnly] = line_folding_only if line_folding_only
|
11
|
+
@attributes[:foldingRangeKind] = folding_range_kind if folding_range_kind
|
12
|
+
@attributes[:foldingRange] = folding_range if folding_range
|
11
13
|
|
12
14
|
@attributes.freeze
|
13
15
|
end
|
@@ -43,6 +45,22 @@ module LanguageServer
|
|
43
45
|
attributes.fetch(:lineFoldingOnly)
|
44
46
|
end
|
45
47
|
|
48
|
+
#
|
49
|
+
# Specific options for the folding range kind.
|
50
|
+
#
|
51
|
+
# @return [{ valueSet?: string[]; }]
|
52
|
+
def folding_range_kind
|
53
|
+
attributes.fetch(:foldingRangeKind)
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# Specific options for the folding range.
|
58
|
+
#
|
59
|
+
# @return [{ collapsedText?: boolean; }]
|
60
|
+
def folding_range
|
61
|
+
attributes.fetch(:foldingRange)
|
62
|
+
end
|
63
|
+
|
46
64
|
attr_reader :attributes
|
47
65
|
|
48
66
|
def to_hash
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A diagnostic report with a full set of problems.
|
6
|
+
#
|
7
|
+
class FullDocumentDiagnosticReport
|
8
|
+
def initialize(kind:, result_id: nil, items:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:kind] = kind
|
12
|
+
@attributes[:resultId] = result_id if result_id
|
13
|
+
@attributes[:items] = items
|
14
|
+
|
15
|
+
@attributes.freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
#
|
19
|
+
# A full document diagnostic report.
|
20
|
+
#
|
21
|
+
# @return [any]
|
22
|
+
def kind
|
23
|
+
attributes.fetch(:kind)
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# An optional result id. If provided it will
|
28
|
+
# be sent on the next diagnostic request for the
|
29
|
+
# same document.
|
30
|
+
#
|
31
|
+
# @return [string]
|
32
|
+
def result_id
|
33
|
+
attributes.fetch(:resultId)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# The actual items.
|
38
|
+
#
|
39
|
+
# @return [Diagnostic[]]
|
40
|
+
def items
|
41
|
+
attributes.fetch(:items)
|
42
|
+
end
|
43
|
+
|
44
|
+
attr_reader :attributes
|
45
|
+
|
46
|
+
def to_hash
|
47
|
+
attributes
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_json(*args)
|
51
|
+
to_hash.to_json(*args)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -20,7 +20,7 @@ module LanguageServer
|
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
23
|
-
# Client supports the
|
23
|
+
# Client supports the follow content formats if the content
|
24
24
|
# property refers to a `literal of type MarkupContent`.
|
25
25
|
# The order describes the preferred format of the client.
|
26
26
|
#
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class HoverResult
|
5
|
+
def initialize(value:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:value] = value
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [string]
|
14
|
+
def value
|
15
|
+
attributes.fetch(:value)
|
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
|