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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75bc1de387f04a538c440a27915783886cde11fe737f7db7d614a5c738e5e9a3
|
4
|
+
data.tar.gz: aad3bee1927ae7fb47977e3260c9f0066115c7fee4e46e0a918363d6a6d35fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15210c7abcf5a80655bc1b2a54fb27f84db90b7a8b2a740a62bacc8101b74d0b18db1940b894f4f66d4fe758a03f3c2e1aa1f639d6db1598eb0991885f63b7ca
|
7
|
+
data.tar.gz: 42b3199685478fa7cf436a448d0c0f9aa0278d73b0c61812bcd40eab7034cc8ef23208fb93492277be33046bada12797959eb89297d7a3769e7eabae66999bd5
|
@@ -71,6 +71,14 @@ module LanguageServer
|
|
71
71
|
# `source.organizeImports`.
|
72
72
|
#
|
73
73
|
SOURCE_ORGANIZE_IMPORTS = 'source.organizeImports'
|
74
|
+
#
|
75
|
+
# Base kind for a 'fix all' source action: `source.fixAll`.
|
76
|
+
#
|
77
|
+
# 'Fix all' actions automatically fix errors that have a clear fix that
|
78
|
+
# do not require user input. They should not suppress errors or perform
|
79
|
+
# unsafe fixes such as generating new types or classes.
|
80
|
+
#
|
81
|
+
SOURCE_FIX_ALL = 'source.fixAll'
|
74
82
|
end
|
75
83
|
end
|
76
84
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# The reason why code actions were requested.
|
6
|
+
#
|
7
|
+
module CodeActionTriggerKind
|
8
|
+
#
|
9
|
+
# Code actions were explicitly requested by the user or by an extension.
|
10
|
+
#
|
11
|
+
INVOKED = 1
|
12
|
+
#
|
13
|
+
# Code actions were requested automatically.
|
14
|
+
#
|
15
|
+
# This typically happens when current selection in a file changes, but can
|
16
|
+
# also be triggered when file content changes.
|
17
|
+
#
|
18
|
+
AUTOMATIC = 2
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# The document diagnostic report kinds.
|
6
|
+
#
|
7
|
+
module DocumentDiagnosticReportKind
|
8
|
+
#
|
9
|
+
# A diagnostic report with a full
|
10
|
+
# set of problems.
|
11
|
+
#
|
12
|
+
FULL = 'full'
|
13
|
+
#
|
14
|
+
# A report indicating that the last
|
15
|
+
# returned report is still accurate.
|
16
|
+
#
|
17
|
+
UNCHANGED = 'unchanged'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -8,7 +8,7 @@ module LanguageServer
|
|
8
8
|
INVALID_PARAMS = -32602
|
9
9
|
INTERNAL_ERROR = -32603
|
10
10
|
#
|
11
|
-
# This is the start range of JSON
|
11
|
+
# This is the start range of JSON-RPC reserved error codes.
|
12
12
|
# It doesn't denote a real error code. No LSP error codes should
|
13
13
|
# be defined between the start and end range. For backwards
|
14
14
|
# compatibility the `ServerNotInitialized` and the `UnknownErrorCode`
|
@@ -16,10 +16,14 @@ module LanguageServer
|
|
16
16
|
#
|
17
17
|
JSONRPC_RESERVED_ERROR_RANGE_START = -32099
|
18
18
|
SERVER_ERROR_START = JSONRPC_RESERVED_ERROR_RANGE_START
|
19
|
+
#
|
20
|
+
# Error code indicating that a server received a notification or
|
21
|
+
# request before the server has received the `initialize` request.
|
22
|
+
#
|
19
23
|
SERVER_NOT_INITIALIZED = -32002
|
20
24
|
UNKNOWN_ERROR_CODE = -32001
|
21
25
|
#
|
22
|
-
# This is the
|
26
|
+
# This is the end range of JSON-RPC reserved error codes.
|
23
27
|
# It doesn't denote a real error code.
|
24
28
|
#
|
25
29
|
JSONRPC_RESERVED_ERROR_RANGE_END = -32000
|
@@ -29,7 +33,34 @@ module LanguageServer
|
|
29
33
|
# It doesn't denote a real error code.
|
30
34
|
#
|
31
35
|
LSP_RESERVED_ERROR_RANGE_START = -32899
|
36
|
+
#
|
37
|
+
# A request failed but it was syntactically correct, e.g the
|
38
|
+
# method name was known and the parameters were valid. The error
|
39
|
+
# message should contain human readable information about why
|
40
|
+
# the request failed.
|
41
|
+
#
|
42
|
+
REQUEST_FAILED = -32803
|
43
|
+
#
|
44
|
+
# The server cancelled the request. This error code should
|
45
|
+
# only be used for requests that explicitly support being
|
46
|
+
# server cancellable.
|
47
|
+
#
|
48
|
+
SERVER_CANCELLED = -32802
|
49
|
+
#
|
50
|
+
# The server detected that the content of a document got
|
51
|
+
# modified outside normal conditions. A server should
|
52
|
+
# NOT send this error code if it detects a content change
|
53
|
+
# in it unprocessed messages. The result even computed
|
54
|
+
# on an older state might still be useful for the client.
|
55
|
+
#
|
56
|
+
# If a client decides that a result is not of any use anymore
|
57
|
+
# the client should cancel the request.
|
58
|
+
#
|
32
59
|
CONTENT_MODIFIED = -32801
|
60
|
+
#
|
61
|
+
# The client has canceled a request and a server as detected
|
62
|
+
# the cancel.
|
63
|
+
#
|
33
64
|
REQUEST_CANCELLED = -32800
|
34
65
|
#
|
35
66
|
# This is the end range of LSP reserved error codes.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# A set of predefined range kinds.
|
6
|
+
# The type is a string since the value set is extensible
|
7
|
+
#
|
8
|
+
module FoldingRangeKind
|
9
|
+
#
|
10
|
+
# Folding range for a comment
|
11
|
+
#
|
12
|
+
COMMENT = 'comment'
|
13
|
+
#
|
14
|
+
# Folding range for a imports or includes
|
15
|
+
#
|
16
|
+
IMPORTS = 'imports'
|
17
|
+
#
|
18
|
+
# Folding range for a region (e.g. `#region`)
|
19
|
+
#
|
20
|
+
REGION = 'region'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/language_server/protocol/constant/{initialize_error.rb → initialize_error_codes.rb}
RENAMED
@@ -2,12 +2,12 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Constant
|
4
4
|
#
|
5
|
-
# Known error codes for an `
|
5
|
+
# Known error codes for an `InitializeErrorCodes`;
|
6
6
|
#
|
7
|
-
module
|
7
|
+
module InitializeErrorCodes
|
8
8
|
#
|
9
|
-
# If the protocol version provided by the client can't be handled by
|
10
|
-
# server.
|
9
|
+
# If the protocol version provided by the client can't be handled by
|
10
|
+
# the server.
|
11
11
|
#
|
12
12
|
UNKNOWN_PROTOCOL_VERSION = 1
|
13
13
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# Inlay hint kinds.
|
6
|
+
#
|
7
|
+
module InlayHintKind
|
8
|
+
#
|
9
|
+
# An inlay hint that for a type annotation.
|
10
|
+
#
|
11
|
+
TYPE = 1
|
12
|
+
#
|
13
|
+
# An inlay hint that is for a parameter.
|
14
|
+
#
|
15
|
+
PARAMETER = 2
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# The moniker kind.
|
6
|
+
#
|
7
|
+
module MonikerKind
|
8
|
+
#
|
9
|
+
# The moniker represent a symbol that is imported into a project
|
10
|
+
#
|
11
|
+
IMPORT = 'import'
|
12
|
+
#
|
13
|
+
# The moniker represents a symbol that is exported from a project
|
14
|
+
#
|
15
|
+
EXPORT = 'export'
|
16
|
+
#
|
17
|
+
# The moniker represents a symbol that is local to a project (e.g. a local
|
18
|
+
# variable of a function, a class not visible outside the project, ...)
|
19
|
+
#
|
20
|
+
LOCAL = 'local'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# A notebook cell kind.
|
6
|
+
#
|
7
|
+
module NotebookCellKind
|
8
|
+
#
|
9
|
+
# A markup-cell is formatted source that is used for display.
|
10
|
+
#
|
11
|
+
MARKUP = 1
|
12
|
+
#
|
13
|
+
# A code-cell is source code.
|
14
|
+
#
|
15
|
+
CODE = 2
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# A type indicating how positions are encoded,
|
6
|
+
# specifically what column offsets mean.
|
7
|
+
# A set of predefined position encoding kinds.
|
8
|
+
#
|
9
|
+
module PositionEncodingKind
|
10
|
+
#
|
11
|
+
# Character offsets count UTF-8 code units.
|
12
|
+
#
|
13
|
+
UTF8 = 'utf-8'
|
14
|
+
#
|
15
|
+
# Character offsets count UTF-16 code units.
|
16
|
+
#
|
17
|
+
# This is the default and must always be supported
|
18
|
+
# by servers
|
19
|
+
#
|
20
|
+
UTF16 = 'utf-16'
|
21
|
+
#
|
22
|
+
# Character offsets count UTF-32 code units.
|
23
|
+
#
|
24
|
+
# Implementation note: these are the same as Unicode code points,
|
25
|
+
# so this `PositionEncodingKind` may also be used for an
|
26
|
+
# encoding-agnostic representation of character offsets.
|
27
|
+
#
|
28
|
+
UTF32 = 'utf-32'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
module SemanticTokenModifiers
|
5
|
+
DECLARATION = 'declaration'
|
6
|
+
DEFINITION = 'definition'
|
7
|
+
READONLY = 'readonly'
|
8
|
+
STATIC = 'static'
|
9
|
+
DEPRECATED = 'deprecated'
|
10
|
+
ABSTRACT = 'abstract'
|
11
|
+
ASYNC = 'async'
|
12
|
+
MODIFICATION = 'modification'
|
13
|
+
DOCUMENTATION = 'documentation'
|
14
|
+
DEFAULT_LIBRARY = 'defaultLibrary'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
module SemanticTokenTypes
|
5
|
+
NAMESPACE = 'namespace'
|
6
|
+
#
|
7
|
+
# Represents a generic type. Acts as a fallback for types which
|
8
|
+
# can't be mapped to a specific type like class or enum.
|
9
|
+
#
|
10
|
+
TYPE = 'type'
|
11
|
+
CLASS = 'class'
|
12
|
+
ENUM = 'enum'
|
13
|
+
INTERFACE = 'interface'
|
14
|
+
STRUCT = 'struct'
|
15
|
+
TYPE_PARAMETER = 'typeParameter'
|
16
|
+
PARAMETER = 'parameter'
|
17
|
+
VARIABLE = 'variable'
|
18
|
+
PROPERTY = 'property'
|
19
|
+
ENUM_MEMBER = 'enumMember'
|
20
|
+
EVENT = 'event'
|
21
|
+
FUNCTION = 'function'
|
22
|
+
METHOD = 'method'
|
23
|
+
MACRO = 'macro'
|
24
|
+
KEYWORD = 'keyword'
|
25
|
+
MODIFIER = 'modifier'
|
26
|
+
COMMENT = 'comment'
|
27
|
+
STRING = 'string'
|
28
|
+
NUMBER = 'number'
|
29
|
+
REGEXP = 'regexp'
|
30
|
+
OPERATOR = 'operator'
|
31
|
+
DECORATOR = 'decorator'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Constant
|
4
|
+
#
|
5
|
+
# Moniker uniqueness level to define scope of the moniker.
|
6
|
+
#
|
7
|
+
module UniquenessLevel
|
8
|
+
#
|
9
|
+
# The moniker is only unique inside a document
|
10
|
+
#
|
11
|
+
DOCUMENT = 'document'
|
12
|
+
#
|
13
|
+
# The moniker is unique inside a project for which a dump got created
|
14
|
+
#
|
15
|
+
PROJECT = 'project'
|
16
|
+
#
|
17
|
+
# The moniker is unique inside the group to which a project belongs
|
18
|
+
#
|
19
|
+
GROUP = 'group'
|
20
|
+
#
|
21
|
+
# The moniker is unique inside the moniker scheme.
|
22
|
+
#
|
23
|
+
SCHEME = 'scheme'
|
24
|
+
#
|
25
|
+
# The moniker is globally unique
|
26
|
+
#
|
27
|
+
GLOBAL = 'global'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -2,23 +2,32 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Constant
|
4
4
|
autoload :CodeActionKind, "language_server/protocol/constant/code_action_kind"
|
5
|
+
autoload :CodeActionTriggerKind, "language_server/protocol/constant/code_action_trigger_kind"
|
5
6
|
autoload :CompletionItemKind, "language_server/protocol/constant/completion_item_kind"
|
6
7
|
autoload :CompletionItemTag, "language_server/protocol/constant/completion_item_tag"
|
7
8
|
autoload :CompletionTriggerKind, "language_server/protocol/constant/completion_trigger_kind"
|
8
9
|
autoload :DiagnosticSeverity, "language_server/protocol/constant/diagnostic_severity"
|
9
10
|
autoload :DiagnosticTag, "language_server/protocol/constant/diagnostic_tag"
|
11
|
+
autoload :DocumentDiagnosticReportKind, "language_server/protocol/constant/document_diagnostic_report_kind"
|
10
12
|
autoload :DocumentHighlightKind, "language_server/protocol/constant/document_highlight_kind"
|
11
13
|
autoload :ErrorCodes, "language_server/protocol/constant/error_codes"
|
12
14
|
autoload :FailureHandlingKind, "language_server/protocol/constant/failure_handling_kind"
|
13
15
|
autoload :FileChangeType, "language_server/protocol/constant/file_change_type"
|
14
16
|
autoload :FileOperationPatternKind, "language_server/protocol/constant/file_operation_pattern_kind"
|
15
|
-
autoload :
|
17
|
+
autoload :FoldingRangeKind, "language_server/protocol/constant/folding_range_kind"
|
18
|
+
autoload :InitializeErrorCodes, "language_server/protocol/constant/initialize_error_codes"
|
19
|
+
autoload :InlayHintKind, "language_server/protocol/constant/inlay_hint_kind"
|
16
20
|
autoload :InsertTextFormat, "language_server/protocol/constant/insert_text_format"
|
17
21
|
autoload :InsertTextMode, "language_server/protocol/constant/insert_text_mode"
|
18
22
|
autoload :MarkupKind, "language_server/protocol/constant/markup_kind"
|
19
23
|
autoload :MessageType, "language_server/protocol/constant/message_type"
|
24
|
+
autoload :MonikerKind, "language_server/protocol/constant/moniker_kind"
|
25
|
+
autoload :NotebookCellKind, "language_server/protocol/constant/notebook_cell_kind"
|
26
|
+
autoload :PositionEncodingKind, "language_server/protocol/constant/position_encoding_kind"
|
20
27
|
autoload :PrepareSupportDefaultBehavior, "language_server/protocol/constant/prepare_support_default_behavior"
|
21
28
|
autoload :ResourceOperationKind, "language_server/protocol/constant/resource_operation_kind"
|
29
|
+
autoload :SemanticTokenModifiers, "language_server/protocol/constant/semantic_token_modifiers"
|
30
|
+
autoload :SemanticTokenTypes, "language_server/protocol/constant/semantic_token_types"
|
22
31
|
autoload :SignatureHelpTriggerKind, "language_server/protocol/constant/signature_help_trigger_kind"
|
23
32
|
autoload :SymbolKind, "language_server/protocol/constant/symbol_kind"
|
24
33
|
autoload :SymbolTag, "language_server/protocol/constant/symbol_tag"
|
@@ -26,26 +35,36 @@ module LanguageServer
|
|
26
35
|
autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
|
27
36
|
autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
|
28
37
|
autoload :TokenFormat, "language_server/protocol/constant/token_format"
|
38
|
+
autoload :UniquenessLevel, "language_server/protocol/constant/uniqueness_level"
|
29
39
|
autoload :WatchKind, "language_server/protocol/constant/watch_kind"
|
30
40
|
|
31
41
|
require "language_server/protocol/constant/code_action_kind"
|
42
|
+
require "language_server/protocol/constant/code_action_trigger_kind"
|
32
43
|
require "language_server/protocol/constant/completion_item_kind"
|
33
44
|
require "language_server/protocol/constant/completion_item_tag"
|
34
45
|
require "language_server/protocol/constant/completion_trigger_kind"
|
35
46
|
require "language_server/protocol/constant/diagnostic_severity"
|
36
47
|
require "language_server/protocol/constant/diagnostic_tag"
|
48
|
+
require "language_server/protocol/constant/document_diagnostic_report_kind"
|
37
49
|
require "language_server/protocol/constant/document_highlight_kind"
|
38
50
|
require "language_server/protocol/constant/error_codes"
|
39
51
|
require "language_server/protocol/constant/failure_handling_kind"
|
40
52
|
require "language_server/protocol/constant/file_change_type"
|
41
53
|
require "language_server/protocol/constant/file_operation_pattern_kind"
|
42
|
-
require "language_server/protocol/constant/
|
54
|
+
require "language_server/protocol/constant/folding_range_kind"
|
55
|
+
require "language_server/protocol/constant/initialize_error_codes"
|
56
|
+
require "language_server/protocol/constant/inlay_hint_kind"
|
43
57
|
require "language_server/protocol/constant/insert_text_format"
|
44
58
|
require "language_server/protocol/constant/insert_text_mode"
|
45
59
|
require "language_server/protocol/constant/markup_kind"
|
46
60
|
require "language_server/protocol/constant/message_type"
|
61
|
+
require "language_server/protocol/constant/moniker_kind"
|
62
|
+
require "language_server/protocol/constant/notebook_cell_kind"
|
63
|
+
require "language_server/protocol/constant/position_encoding_kind"
|
47
64
|
require "language_server/protocol/constant/prepare_support_default_behavior"
|
48
65
|
require "language_server/protocol/constant/resource_operation_kind"
|
66
|
+
require "language_server/protocol/constant/semantic_token_modifiers"
|
67
|
+
require "language_server/protocol/constant/semantic_token_types"
|
49
68
|
require "language_server/protocol/constant/signature_help_trigger_kind"
|
50
69
|
require "language_server/protocol/constant/symbol_kind"
|
51
70
|
require "language_server/protocol/constant/symbol_tag"
|
@@ -53,6 +72,7 @@ module LanguageServer
|
|
53
72
|
require "language_server/protocol/constant/text_document_sync_kind"
|
54
73
|
require "language_server/protocol/constant/text_document_sync_kind"
|
55
74
|
require "language_server/protocol/constant/token_format"
|
75
|
+
require "language_server/protocol/constant/uniqueness_level"
|
56
76
|
require "language_server/protocol/constant/watch_kind"
|
57
77
|
end
|
58
78
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class
|
4
|
+
class ApplyWorkspaceEditResult
|
5
5
|
def initialize(applied:, failure_reason: nil, failed_change: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
@@ -33,7 +33,7 @@ module LanguageServer
|
|
33
33
|
#
|
34
34
|
# Depending on the client's failure handling strategy `failedChange`
|
35
35
|
# might contain the index of the change that failed. This property is
|
36
|
-
# only available if the client signals a `
|
36
|
+
# only available if the client signals a `failureHandling` strategy
|
37
37
|
# in its client capabilities.
|
38
38
|
#
|
39
39
|
# @return [number]
|
@@ -2,11 +2,12 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class ClientCapabilities
|
5
|
-
def initialize(workspace: nil, text_document: nil, window: nil, general: nil, experimental: nil)
|
5
|
+
def initialize(workspace: nil, text_document: nil, notebook_document: nil, window: nil, general: nil, experimental: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:workspace] = workspace if workspace
|
9
9
|
@attributes[:textDocument] = text_document if text_document
|
10
|
+
@attributes[:notebookDocument] = notebook_document if notebook_document
|
10
11
|
@attributes[:window] = window if window
|
11
12
|
@attributes[:general] = general if general
|
12
13
|
@attributes[:experimental] = experimental if experimental
|
@@ -17,7 +18,7 @@ module LanguageServer
|
|
17
18
|
#
|
18
19
|
# Workspace specific client capabilities.
|
19
20
|
#
|
20
|
-
# @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ...
|
21
|
+
# @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }]
|
21
22
|
def workspace
|
22
23
|
attributes.fetch(:workspace)
|
23
24
|
end
|
@@ -30,6 +31,14 @@ module LanguageServer
|
|
30
31
|
attributes.fetch(:textDocument)
|
31
32
|
end
|
32
33
|
|
34
|
+
#
|
35
|
+
# Capabilities specific to the notebook document support.
|
36
|
+
#
|
37
|
+
# @return [NotebookDocumentClientCapabilities]
|
38
|
+
def notebook_document
|
39
|
+
attributes.fetch(:notebookDocument)
|
40
|
+
end
|
41
|
+
|
33
42
|
#
|
34
43
|
# Window specific client capabilities.
|
35
44
|
#
|
@@ -41,7 +50,7 @@ module LanguageServer
|
|
41
50
|
#
|
42
51
|
# General client capabilities.
|
43
52
|
#
|
44
|
-
# @return [{ regularExpressions?: RegularExpressionsClientCapabilities; markdown?:
|
53
|
+
# @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }]
|
45
54
|
def general
|
46
55
|
attributes.fetch(:general)
|
47
56
|
end
|
@@ -49,7 +58,7 @@ module LanguageServer
|
|
49
58
|
#
|
50
59
|
# Experimental client capabilities.
|
51
60
|
#
|
52
|
-
# @return [
|
61
|
+
# @return [LSPAny]
|
53
62
|
def experimental
|
54
63
|
attributes.fetch(:experimental)
|
55
64
|
end
|
@@ -107,7 +107,7 @@ module LanguageServer
|
|
107
107
|
# A data entry field that is preserved on a code action between
|
108
108
|
# a `textDocument/codeAction` and a `codeAction/resolve` request.
|
109
109
|
#
|
110
|
-
# @return [
|
110
|
+
# @return [LSPAny]
|
111
111
|
def data
|
112
112
|
attributes.fetch(:data)
|
113
113
|
end
|
@@ -6,11 +6,12 @@ module LanguageServer
|
|
6
6
|
# a code action is run.
|
7
7
|
#
|
8
8
|
class CodeActionContext
|
9
|
-
def initialize(diagnostics:, only: nil)
|
9
|
+
def initialize(diagnostics:, only: nil, trigger_kind: nil)
|
10
10
|
@attributes = {}
|
11
11
|
|
12
12
|
@attributes[:diagnostics] = diagnostics
|
13
13
|
@attributes[:only] = only if only
|
14
|
+
@attributes[:triggerKind] = trigger_kind if trigger_kind
|
14
15
|
|
15
16
|
@attributes.freeze
|
16
17
|
end
|
@@ -39,6 +40,14 @@ module LanguageServer
|
|
39
40
|
attributes.fetch(:only)
|
40
41
|
end
|
41
42
|
|
43
|
+
#
|
44
|
+
# The reason why code actions were requested.
|
45
|
+
#
|
46
|
+
# @return [CodeActionTriggerKind]
|
47
|
+
def trigger_kind
|
48
|
+
attributes.fetch(:triggerKind)
|
49
|
+
end
|
50
|
+
|
42
51
|
attr_reader :attributes
|
43
52
|
|
44
53
|
def to_hash
|
@@ -24,7 +24,7 @@ module LanguageServer
|
|
24
24
|
|
25
25
|
#
|
26
26
|
# An [edit](#TextEdit) which is applied to a document when selecting
|
27
|
-
# this presentation for the color.
|
27
|
+
# this presentation for the color. When `falsy` the
|
28
28
|
# [label](#ColorPresentation.label) is used.
|
29
29
|
#
|
30
30
|
# @return [TextEdit]
|