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,75 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A full document diagnostic report for a workspace diagnostic result.
|
6
|
+
#
|
7
|
+
class WorkspaceFullDocumentDiagnosticReport
|
8
|
+
def initialize(kind:, result_id: nil, items:, uri:, version:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:kind] = kind
|
12
|
+
@attributes[:resultId] = result_id if result_id
|
13
|
+
@attributes[:items] = items
|
14
|
+
@attributes[:uri] = uri
|
15
|
+
@attributes[:version] = version
|
16
|
+
|
17
|
+
@attributes.freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# A full document diagnostic report.
|
22
|
+
#
|
23
|
+
# @return [any]
|
24
|
+
def kind
|
25
|
+
attributes.fetch(:kind)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# An optional result id. If provided it will
|
30
|
+
# be sent on the next diagnostic request for the
|
31
|
+
# same document.
|
32
|
+
#
|
33
|
+
# @return [string]
|
34
|
+
def result_id
|
35
|
+
attributes.fetch(:resultId)
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# The actual items.
|
40
|
+
#
|
41
|
+
# @return [Diagnostic[]]
|
42
|
+
def items
|
43
|
+
attributes.fetch(:items)
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# The URI for which diagnostic information is reported.
|
48
|
+
#
|
49
|
+
# @return [string]
|
50
|
+
def uri
|
51
|
+
attributes.fetch(:uri)
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# The version number for which the diagnostics are reported.
|
56
|
+
# If the document is not marked as open `null` can be provided.
|
57
|
+
#
|
58
|
+
# @return [number]
|
59
|
+
def version
|
60
|
+
attributes.fetch(:version)
|
61
|
+
end
|
62
|
+
|
63
|
+
attr_reader :attributes
|
64
|
+
|
65
|
+
def to_hash
|
66
|
+
attributes
|
67
|
+
end
|
68
|
+
|
69
|
+
def to_json(*args)
|
70
|
+
to_hash.to_json(*args)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A special workspace symbol that supports locations without a range
|
6
|
+
#
|
7
|
+
class WorkspaceSymbol
|
8
|
+
def initialize(name:, kind:, tags: nil, container_name: nil, location:, data: nil)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:name] = name
|
12
|
+
@attributes[:kind] = kind
|
13
|
+
@attributes[:tags] = tags if tags
|
14
|
+
@attributes[:containerName] = container_name if container_name
|
15
|
+
@attributes[:location] = location
|
16
|
+
@attributes[:data] = data if data
|
17
|
+
|
18
|
+
@attributes.freeze
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# The name of this symbol.
|
23
|
+
#
|
24
|
+
# @return [string]
|
25
|
+
def name
|
26
|
+
attributes.fetch(:name)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# The kind of this symbol.
|
31
|
+
#
|
32
|
+
# @return [SymbolKind]
|
33
|
+
def kind
|
34
|
+
attributes.fetch(:kind)
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Tags for this completion item.
|
39
|
+
#
|
40
|
+
# @return [1[]]
|
41
|
+
def tags
|
42
|
+
attributes.fetch(:tags)
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# The name of the symbol containing this symbol. This information is for
|
47
|
+
# user interface purposes (e.g. to render a qualifier in the user interface
|
48
|
+
# if necessary). It can't be used to re-infer a hierarchy for the document
|
49
|
+
# symbols.
|
50
|
+
#
|
51
|
+
# @return [string]
|
52
|
+
def container_name
|
53
|
+
attributes.fetch(:containerName)
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# The location of this symbol. Whether a server is allowed to
|
58
|
+
# return a location without a range depends on the client
|
59
|
+
# capability `workspace.symbol.resolveSupport`.
|
60
|
+
#
|
61
|
+
# See also `SymbolInformation.location`.
|
62
|
+
#
|
63
|
+
# @return [Location | { uri: string; }]
|
64
|
+
def location
|
65
|
+
attributes.fetch(:location)
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# A data entry field that is preserved on a workspace symbol between a
|
70
|
+
# workspace symbol request and a workspace symbol resolve request.
|
71
|
+
#
|
72
|
+
# @return [LSPAny]
|
73
|
+
def data
|
74
|
+
attributes.fetch(:data)
|
75
|
+
end
|
76
|
+
|
77
|
+
attr_reader :attributes
|
78
|
+
|
79
|
+
def to_hash
|
80
|
+
attributes
|
81
|
+
end
|
82
|
+
|
83
|
+
def to_json(*args)
|
84
|
+
to_hash.to_json(*args)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -2,12 +2,13 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class WorkspaceSymbolClientCapabilities
|
5
|
-
def initialize(dynamic_registration: nil, symbol_kind: nil, tag_support: nil)
|
5
|
+
def initialize(dynamic_registration: nil, symbol_kind: nil, tag_support: nil, resolve_support: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
9
|
@attributes[:symbolKind] = symbol_kind if symbol_kind
|
10
10
|
@attributes[:tagSupport] = tag_support if tag_support
|
11
|
+
@attributes[:resolveSupport] = resolve_support if resolve_support
|
11
12
|
|
12
13
|
@attributes.freeze
|
13
14
|
end
|
@@ -24,13 +25,13 @@ module LanguageServer
|
|
24
25
|
# Specific capabilities for the `SymbolKind` in the `workspace/symbol`
|
25
26
|
# request.
|
26
27
|
#
|
27
|
-
# @return [{ valueSet?:
|
28
|
+
# @return [{ valueSet?: SymbolKind[]; }]
|
28
29
|
def symbol_kind
|
29
30
|
attributes.fetch(:symbolKind)
|
30
31
|
end
|
31
32
|
|
32
33
|
#
|
33
|
-
# The client supports tags on `SymbolInformation`.
|
34
|
+
# The client supports tags on `SymbolInformation` and `WorkspaceSymbol`.
|
34
35
|
# Clients supporting tags have to handle unknown tags gracefully.
|
35
36
|
#
|
36
37
|
# @return [{ valueSet: 1[]; }]
|
@@ -38,6 +39,16 @@ module LanguageServer
|
|
38
39
|
attributes.fetch(:tagSupport)
|
39
40
|
end
|
40
41
|
|
42
|
+
#
|
43
|
+
# The client support partial workspace symbols. The client will send the
|
44
|
+
# request `workspaceSymbol/resolve` to the server to resolve additional
|
45
|
+
# properties.
|
46
|
+
#
|
47
|
+
# @return [{ properties: string[]; }]
|
48
|
+
def resolve_support
|
49
|
+
attributes.fetch(:resolveSupport)
|
50
|
+
end
|
51
|
+
|
41
52
|
attr_reader :attributes
|
42
53
|
|
43
54
|
def to_hash
|
@@ -2,10 +2,11 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class WorkspaceSymbolOptions
|
5
|
-
def initialize(work_done_progress: nil)
|
5
|
+
def initialize(work_done_progress: nil, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
9
10
|
|
10
11
|
@attributes.freeze
|
11
12
|
end
|
@@ -15,6 +16,15 @@ module LanguageServer
|
|
15
16
|
attributes.fetch(:workDoneProgress)
|
16
17
|
end
|
17
18
|
|
19
|
+
#
|
20
|
+
# The server provides support to resolve additional
|
21
|
+
# information for a workspace symbol.
|
22
|
+
#
|
23
|
+
# @return [boolean]
|
24
|
+
def resolve_provider
|
25
|
+
attributes.fetch(:resolveProvider)
|
26
|
+
end
|
27
|
+
|
18
28
|
attr_reader :attributes
|
19
29
|
|
20
30
|
def to_hash
|
@@ -2,10 +2,11 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class WorkspaceSymbolRegistrationOptions
|
5
|
-
def initialize(work_done_progress: nil)
|
5
|
+
def initialize(work_done_progress: nil, resolve_provider: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
9
10
|
|
10
11
|
@attributes.freeze
|
11
12
|
end
|
@@ -15,6 +16,15 @@ module LanguageServer
|
|
15
16
|
attributes.fetch(:workDoneProgress)
|
16
17
|
end
|
17
18
|
|
19
|
+
#
|
20
|
+
# The server provides support to resolve additional
|
21
|
+
# information for a workspace symbol.
|
22
|
+
#
|
23
|
+
# @return [boolean]
|
24
|
+
def resolve_provider
|
25
|
+
attributes.fetch(:resolveProvider)
|
26
|
+
end
|
27
|
+
|
18
28
|
attr_reader :attributes
|
19
29
|
|
20
30
|
def to_hash
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# An unchanged document diagnostic report for a workspace diagnostic result.
|
6
|
+
#
|
7
|
+
class WorkspaceUnchangedDocumentDiagnosticReport
|
8
|
+
def initialize(kind:, result_id:, uri:, version:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:kind] = kind
|
12
|
+
@attributes[:resultId] = result_id
|
13
|
+
@attributes[:uri] = uri
|
14
|
+
@attributes[:version] = version
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# A document diagnostic report indicating
|
21
|
+
# no changes to the last result. A server can
|
22
|
+
# only return `unchanged` if result ids are
|
23
|
+
# provided.
|
24
|
+
#
|
25
|
+
# @return [any]
|
26
|
+
def kind
|
27
|
+
attributes.fetch(:kind)
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# A result id which will be sent on the next
|
32
|
+
# diagnostic request for the same document.
|
33
|
+
#
|
34
|
+
# @return [string]
|
35
|
+
def result_id
|
36
|
+
attributes.fetch(:resultId)
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# The URI for which diagnostic information is reported.
|
41
|
+
#
|
42
|
+
# @return [string]
|
43
|
+
def uri
|
44
|
+
attributes.fetch(:uri)
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# The version number for which the diagnostics are reported.
|
49
|
+
# If the document is not marked as open `null` can be provided.
|
50
|
+
#
|
51
|
+
# @return [number]
|
52
|
+
def version
|
53
|
+
attributes.fetch(:version)
|
54
|
+
end
|
55
|
+
|
56
|
+
attr_reader :attributes
|
57
|
+
|
58
|
+
def to_hash
|
59
|
+
attributes
|
60
|
+
end
|
61
|
+
|
62
|
+
def to_json(*args)
|
63
|
+
to_hash.to_json(*args)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|