language_server-protocol 3.15.0.2 → 3.16.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/language_server/protocol/constant/code_action_kind.rb +6 -4
- data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -2
- data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -2
- data/lib/language_server/protocol/constant/error_codes.rb +26 -3
- data/lib/language_server/protocol/constant/failure_handling_kind.rb +6 -5
- data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +20 -0
- data/lib/language_server/protocol/constant/initialize_error.rb +2 -1
- data/lib/language_server/protocol/constant/insert_text_mode.rb +30 -0
- data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +13 -0
- data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -1
- data/lib/language_server/protocol/constant/symbol_tag.rb +15 -0
- data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
- data/lib/language_server/protocol/constant/text_document_sync_kind.rb +2 -2
- data/lib/language_server/protocol/constant/token_format.rb +9 -0
- data/lib/language_server/protocol/constant.rb +10 -0
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +56 -0
- data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +15 -4
- data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +43 -0
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +49 -0
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +30 -0
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +43 -0
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +49 -0
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +51 -0
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
- data/lib/language_server/protocol/interface/client_capabilities.rb +12 -3
- data/lib/language_server/protocol/interface/code_action.rb +43 -8
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +44 -1
- data/lib/language_server/protocol/interface/code_action_context.rb +7 -6
- data/lib/language_server/protocol/interface/code_action_options.rb +19 -4
- data/lib/language_server/protocol/interface/code_action_params.rb +20 -2
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +38 -2
- data/lib/language_server/protocol/interface/code_description.rb +36 -0
- data/lib/language_server/protocol/interface/code_lens.rb +5 -3
- data/lib/language_server/protocol/interface/code_lens_options.rb +6 -1
- data/lib/language_server/protocol/interface/code_lens_params.rb +20 -2
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +25 -2
- data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +39 -0
- data/lib/language_server/protocol/interface/color_presentation.rb +7 -6
- data/lib/language_server/protocol/interface/color_presentation_params.rb +20 -2
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/completion_context.rb +5 -3
- data/lib/language_server/protocol/interface/completion_item.rb +60 -29
- data/lib/language_server/protocol/interface/completion_list.rb +2 -2
- data/lib/language_server/protocol/interface/completion_options.rb +21 -13
- data/lib/language_server/protocol/interface/completion_params.rb +40 -3
- data/lib/language_server/protocol/interface/completion_registration_options.rb +57 -2
- data/lib/language_server/protocol/interface/create_file.rb +10 -1
- data/lib/language_server/protocol/interface/create_files_params.rb +37 -0
- data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/declaration_options.rb +6 -1
- data/lib/language_server/protocol/interface/declaration_params.rb +38 -2
- data/lib/language_server/protocol/interface/declaration_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/definition_options.rb +6 -1
- data/lib/language_server/protocol/interface/definition_params.rb +38 -2
- data/lib/language_server/protocol/interface/definition_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/delete_file.rb +10 -1
- data/lib/language_server/protocol/interface/delete_files_params.rb +37 -0
- data/lib/language_server/protocol/interface/diagnostic.rb +21 -1
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
- data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -9
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/document_color_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_color_params.rb +20 -2
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/document_filter.rb +7 -3
- data/lib/language_server/protocol/interface/document_formatting_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_formatting_params.rb +9 -1
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
- data/lib/language_server/protocol/interface/document_highlight_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_highlight_params.rb +38 -2
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_link.rb +6 -5
- data/lib/language_server/protocol/interface/document_link_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_link_params.rb +20 -2
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +25 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +17 -1
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +28 -2
- data/lib/language_server/protocol/interface/document_range_formatting_options.rb +6 -1
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +9 -1
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_symbol.rb +23 -11
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +24 -2
- data/lib/language_server/protocol/interface/document_symbol_options.rb +17 -2
- data/lib/language_server/protocol/interface/document_symbol_params.rb +20 -2
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/execute_command_options.rb +6 -1
- data/lib/language_server/protocol/interface/execute_command_params.rb +9 -1
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +14 -1
- data/lib/language_server/protocol/interface/file_create.rb +36 -0
- data/lib/language_server/protocol/interface/file_delete.rb +36 -0
- data/lib/language_server/protocol/interface/file_operation_filter.rb +46 -0
- data/lib/language_server/protocol/interface/file_operation_pattern.rb +67 -0
- data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +36 -0
- data/lib/language_server/protocol/interface/file_operation_registration_options.rb +36 -0
- data/lib/language_server/protocol/interface/file_rename.rb +45 -0
- data/lib/language_server/protocol/interface/file_system_watcher.rb +7 -3
- data/lib/language_server/protocol/interface/folding_range.rb +17 -8
- data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +10 -7
- data/lib/language_server/protocol/interface/folding_range_options.rb +6 -1
- data/lib/language_server/protocol/interface/folding_range_params.rb +20 -2
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/hover.rb +1 -1
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +3 -2
- data/lib/language_server/protocol/interface/hover_options.rb +6 -1
- data/lib/language_server/protocol/interface/hover_params.rb +28 -2
- data/lib/language_server/protocol/interface/hover_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/implementation_options.rb +6 -1
- data/lib/language_server/protocol/interface/implementation_params.rb +38 -2
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/initialize_params.rb +29 -6
- data/lib/language_server/protocol/interface/insert_replace_edit.rb +54 -0
- data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/linked_editing_range_options.rb +30 -0
- data/lib/language_server/protocol/interface/linked_editing_range_params.rb +51 -0
- data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
- data/lib/language_server/protocol/interface/location_link.rb +9 -7
- data/lib/language_server/protocol/interface/log_message_params.rb +1 -1
- data/lib/language_server/protocol/interface/log_trace_params.rb +43 -0
- data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +45 -0
- data/lib/language_server/protocol/interface/markup_content.rb +9 -7
- data/lib/language_server/protocol/interface/moniker.rb +64 -0
- data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/moniker_options.rb +30 -0
- data/lib/language_server/protocol/interface/moniker_params.rb +61 -0
- data/lib/language_server/protocol/interface/moniker_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/notification_message.rb +6 -1
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +50 -0
- data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
- data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
- data/lib/language_server/protocol/interface/position.rb +5 -5
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +17 -1
- data/lib/language_server/protocol/interface/progress_params.rb +1 -1
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +21 -1
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +2 -1
- data/lib/language_server/protocol/interface/reference_options.rb +6 -1
- data/lib/language_server/protocol/interface/reference_params.rb +38 -2
- data/lib/language_server/protocol/interface/reference_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +27 -1
- data/lib/language_server/protocol/interface/rename_file.rb +10 -1
- data/lib/language_server/protocol/interface/rename_files_params.rb +38 -0
- data/lib/language_server/protocol/interface/rename_options.rb +6 -1
- data/lib/language_server/protocol/interface/rename_params.rb +28 -2
- data/lib/language_server/protocol/interface/rename_registration_options.rb +25 -2
- data/lib/language_server/protocol/interface/request_message.rb +6 -1
- data/lib/language_server/protocol/interface/response_message.rb +6 -1
- data/lib/language_server/protocol/interface/selection_range.rb +2 -1
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -3
- data/lib/language_server/protocol/interface/selection_range_options.rb +6 -1
- data/lib/language_server/protocol/interface/selection_range_params.rb +20 -2
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/semantic_tokens.rb +45 -0
- data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +97 -0
- data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +40 -0
- data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +62 -0
- data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +30 -0
- data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +51 -0
- data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +42 -0
- data/lib/language_server/protocol/interface/semantic_tokens_options.rb +58 -0
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +52 -0
- data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +30 -0
- data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +61 -0
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +78 -0
- data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
- data/lib/language_server/protocol/interface/server_capabilities.rb +47 -9
- data/lib/language_server/protocol/interface/set_trace_params.rb +33 -0
- data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +37 -0
- data/lib/language_server/protocol/interface/show_document_params.rb +71 -0
- data/lib/language_server/protocol/interface/show_document_result.rb +36 -0
- data/lib/language_server/protocol/interface/show_message_params.rb +1 -1
- data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/show_message_request_params.rb +1 -1
- data/lib/language_server/protocol/interface/signature_help.rb +3 -3
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/signature_help_context.rb +10 -7
- data/lib/language_server/protocol/interface/signature_help_options.rb +9 -3
- data/lib/language_server/protocol/interface/signature_help_params.rb +31 -4
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +38 -2
- data/lib/language_server/protocol/interface/signature_information.rb +12 -1
- data/lib/language_server/protocol/interface/symbol_information.rb +10 -1
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +11 -2
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +39 -2
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_registration_options.rb +3 -3
- data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +10 -1
- data/lib/language_server/protocol/interface/text_document_sync_options.rb +13 -15
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/type_definition_options.rb +6 -1
- data/lib/language_server/protocol/interface/type_definition_params.rb +38 -2
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +27 -2
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +12 -8
- data/lib/language_server/protocol/interface/will_save_text_document_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_begin.rb +3 -3
- data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_params.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_report.rb +5 -5
- data/lib/language_server/protocol/interface/workspace_edit.rb +24 -7
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +23 -1
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +13 -2
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +6 -1
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +20 -2
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +6 -1
- data/lib/language_server/protocol/interface.rb +112 -0
- data/lib/language_server/protocol/transport/io/reader.rb +8 -24
- data/lib/language_server/protocol/transport/io/writer.rb +1 -0
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +68 -21
@@ -2,13 +2,15 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# A `MarkupContent` literal represents a string value which content is
|
6
|
-
# kind flag. Currently the protocol supports
|
5
|
+
# A `MarkupContent` literal represents a string value which content is
|
6
|
+
# interpreted base on its kind flag. Currently the protocol supports
|
7
|
+
# `plaintext` and `markdown` as markup kinds.
|
7
8
|
#
|
8
|
-
# If the kind is `markdown` then the value can contain fenced code blocks like
|
9
|
-
#
|
9
|
+
# If the kind is `markdown` then the value can contain fenced code blocks like
|
10
|
+
# in GitHub issues.
|
10
11
|
#
|
11
|
-
# Here is an example how such a string can be constructed using
|
12
|
+
# Here is an example how such a string can be constructed using
|
13
|
+
# JavaScript / TypeScript:
|
12
14
|
# ```typescript
|
13
15
|
# let markdown: MarkdownContent = {
|
14
16
|
# kind: MarkupKind.Markdown,
|
@@ -22,8 +24,8 @@ module LanguageServer
|
|
22
24
|
# };
|
23
25
|
# ```
|
24
26
|
#
|
25
|
-
# *Please Note* that clients might sanitize the return markdown. A client could
|
26
|
-
# remove HTML from the markdown to avoid script execution.
|
27
|
+
# *Please Note* that clients might sanitize the return markdown. A client could
|
28
|
+
# decide to remove HTML from the markdown to avoid script execution.
|
27
29
|
#
|
28
30
|
class MarkupContent
|
29
31
|
def initialize(kind:, value:)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Moniker definition to match LSIF 0.5 moniker definition.
|
6
|
+
#
|
7
|
+
class Moniker
|
8
|
+
def initialize(scheme:, identifier:, unique:, kind: nil)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:scheme] = scheme
|
12
|
+
@attributes[:identifier] = identifier
|
13
|
+
@attributes[:unique] = unique
|
14
|
+
@attributes[:kind] = kind if kind
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# The scheme of the moniker. For example tsc or .Net
|
21
|
+
#
|
22
|
+
# @return [string]
|
23
|
+
def scheme
|
24
|
+
attributes.fetch(:scheme)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# The identifier of the moniker. The value is opaque in LSIF however
|
29
|
+
# schema owners are allowed to define the structure if they want.
|
30
|
+
#
|
31
|
+
# @return [string]
|
32
|
+
def identifier
|
33
|
+
attributes.fetch(:identifier)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# The scope in which the moniker is unique
|
38
|
+
#
|
39
|
+
# @return [UniquenessLevel]
|
40
|
+
def unique
|
41
|
+
attributes.fetch(:unique)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The moniker kind if known.
|
46
|
+
#
|
47
|
+
# @return [MonikerKind]
|
48
|
+
def kind
|
49
|
+
attributes.fetch(:kind)
|
50
|
+
end
|
51
|
+
|
52
|
+
attr_reader :attributes
|
53
|
+
|
54
|
+
def to_hash
|
55
|
+
attributes
|
56
|
+
end
|
57
|
+
|
58
|
+
def to_json(*args)
|
59
|
+
to_hash.to_json(*args)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class MonikerClientCapabilities
|
5
|
+
def initialize(dynamic_registration: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# Whether implementation supports dynamic registration. If this is set to
|
15
|
+
# `true` the client supports the new `(TextDocumentRegistrationOptions &
|
16
|
+
# StaticRegistrationOptions)` return value for the corresponding server
|
17
|
+
# capability as well.
|
18
|
+
#
|
19
|
+
# @return [boolean]
|
20
|
+
def dynamic_registration
|
21
|
+
attributes.fetch(:dynamicRegistration)
|
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,30 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class MonikerOptions
|
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,61 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class MonikerParams
|
5
|
+
def initialize(text_document:, position:, work_done_token: nil, partial_result_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
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# The text document.
|
18
|
+
#
|
19
|
+
# @return [TextDocumentIdentifier]
|
20
|
+
def text_document
|
21
|
+
attributes.fetch(:textDocument)
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# The position inside the text document.
|
26
|
+
#
|
27
|
+
# @return [Position]
|
28
|
+
def position
|
29
|
+
attributes.fetch(:position)
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# An optional token that a server can use to report work done progress.
|
34
|
+
#
|
35
|
+
# @return [ProgressToken]
|
36
|
+
def work_done_token
|
37
|
+
attributes.fetch(:workDoneToken)
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# An optional token that a server can use to report partial results (e.g.
|
42
|
+
# streaming) to the client.
|
43
|
+
#
|
44
|
+
# @return [ProgressToken]
|
45
|
+
def partial_result_token
|
46
|
+
attributes.fetch(:partialResultToken)
|
47
|
+
end
|
48
|
+
|
49
|
+
attr_reader :attributes
|
50
|
+
|
51
|
+
def to_hash
|
52
|
+
attributes
|
53
|
+
end
|
54
|
+
|
55
|
+
def to_json(*args)
|
56
|
+
to_hash.to_json(*args)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class MonikerRegistrationOptions
|
5
|
+
def initialize(document_selector:, work_done_progress: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:documentSelector] = document_selector
|
9
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# A document selector to identify the scope of the registration. If set to
|
16
|
+
# null the document selector provided on the client side will be used.
|
17
|
+
#
|
18
|
+
# @return [DocumentSelector]
|
19
|
+
def document_selector
|
20
|
+
attributes.fetch(:documentSelector)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [boolean]
|
24
|
+
def work_done_progress
|
25
|
+
attributes.fetch(:workDoneProgress)
|
26
|
+
end
|
27
|
+
|
28
|
+
attr_reader :attributes
|
29
|
+
|
30
|
+
def to_hash
|
31
|
+
attributes
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_json(*args)
|
35
|
+
to_hash.to_json(*args)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class NotificationMessage
|
4
|
+
class NotificationMessage
|
5
5
|
def initialize(jsonrpc:, method:, params: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
@@ -12,6 +12,11 @@ module LanguageServer
|
|
12
12
|
@attributes.freeze
|
13
13
|
end
|
14
14
|
|
15
|
+
# @return [string]
|
16
|
+
def jsonrpc
|
17
|
+
attributes.fetch(:jsonrpc)
|
18
|
+
end
|
19
|
+
|
15
20
|
#
|
16
21
|
# The method to be invoked.
|
17
22
|
#
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class OptionalVersionedTextDocumentIdentifier
|
5
|
+
def initialize(uri:, version:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:uri] = uri
|
9
|
+
@attributes[:version] = version
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# The text document's URI.
|
16
|
+
#
|
17
|
+
# @return [string]
|
18
|
+
def uri
|
19
|
+
attributes.fetch(:uri)
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# The version number of this document. If an optional versioned text document
|
24
|
+
# identifier is sent from the server to the client and the file is not
|
25
|
+
# open in the editor (the server has not received an open notification
|
26
|
+
# before) the server can send `null` to indicate that the version is
|
27
|
+
# known and the content on disk is the master (as specified with document
|
28
|
+
# content ownership).
|
29
|
+
#
|
30
|
+
# The version number of a document will increase after each change,
|
31
|
+
# including undo/redo. The number doesn't need to be consecutive.
|
32
|
+
#
|
33
|
+
# @return [number]
|
34
|
+
def version
|
35
|
+
attributes.fetch(:version)
|
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
|
@@ -18,12 +18,14 @@ module LanguageServer
|
|
18
18
|
#
|
19
19
|
# The label of this parameter information.
|
20
20
|
#
|
21
|
-
# Either a string or an inclusive start and exclusive end offsets within
|
22
|
-
# signature label. (see SignatureInformation.label). The
|
23
|
-
# string representation as `Position` and
|
21
|
+
# Either a string or an inclusive start and exclusive end offsets within
|
22
|
+
# its containing signature label. (see SignatureInformation.label). The
|
23
|
+
# offsets are based on a UTF-16 string representation as `Position` and
|
24
|
+
# `Range` does.
|
24
25
|
#
|
25
|
-
# *Note*: a label of type string should be a substring of its containing
|
26
|
-
# Its intended use case is to highlight the parameter
|
26
|
+
# *Note*: a label of type string should be a substring of its containing
|
27
|
+
# signature label. Its intended use case is to highlight the parameter
|
28
|
+
# label part in the `SignatureInformation.label`.
|
27
29
|
#
|
28
30
|
# @return [string | [number, number]]
|
29
31
|
def label
|
@@ -11,10 +11,10 @@ module LanguageServer
|
|
11
11
|
end
|
12
12
|
|
13
13
|
#
|
14
|
-
# An optional token that a server can use to report partial results (e.g.
|
15
|
-
# the client.
|
14
|
+
# An optional token that a server can use to report partial results (e.g.
|
15
|
+
# streaming) to the client.
|
16
16
|
#
|
17
|
-
# @return [
|
17
|
+
# @return [ProgressToken]
|
18
18
|
def partial_result_token
|
19
19
|
attributes.fetch(:partialResultToken)
|
20
20
|
end
|
@@ -20,12 +20,12 @@ module LanguageServer
|
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
23
|
-
# Character offset on a line in a document (zero-based). Assuming that
|
24
|
-
# represented as a string, the `character` value represents
|
25
|
-
# `character` and `character + 1`.
|
23
|
+
# Character offset on a line in a document (zero-based). Assuming that
|
24
|
+
# the line is represented as a string, the `character` value represents
|
25
|
+
# the gap between the `character` and `character + 1`.
|
26
26
|
#
|
27
|
-
# If the character value is greater than the line length it defaults back
|
28
|
-
# line length.
|
27
|
+
# If the character value is greater than the line length it defaults back
|
28
|
+
# to the line length.
|
29
29
|
#
|
30
30
|
# @return [number]
|
31
31
|
def character
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class PrepareRenameParams
|
4
|
+
class PrepareRenameParams
|
5
5
|
def initialize(text_document:, position:)
|
6
6
|
@attributes = {}
|
7
7
|
|
@@ -11,6 +11,22 @@ module LanguageServer
|
|
11
11
|
@attributes.freeze
|
12
12
|
end
|
13
13
|
|
14
|
+
#
|
15
|
+
# The text document.
|
16
|
+
#
|
17
|
+
# @return [TextDocumentIdentifier]
|
18
|
+
def text_document
|
19
|
+
attributes.fetch(:textDocument)
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# The position inside the text document.
|
24
|
+
#
|
25
|
+
# @return [Position]
|
26
|
+
def position
|
27
|
+
attributes.fetch(:position)
|
28
|
+
end
|
29
|
+
|
14
30
|
attr_reader :attributes
|
15
31
|
|
16
32
|
def to_hash
|
@@ -2,12 +2,14 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class PublishDiagnosticsClientCapabilities
|
5
|
-
def initialize(related_information: nil, tag_support: nil, version_support: nil)
|
5
|
+
def initialize(related_information: nil, tag_support: nil, version_support: nil, code_description_support: nil, data_support: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:relatedInformation] = related_information if related_information
|
9
9
|
@attributes[:tagSupport] = tag_support if tag_support
|
10
10
|
@attributes[:versionSupport] = version_support if version_support
|
11
|
+
@attributes[:codeDescriptionSupport] = code_description_support if code_description_support
|
12
|
+
@attributes[:dataSupport] = data_support if data_support
|
11
13
|
|
12
14
|
@attributes.freeze
|
13
15
|
end
|
@@ -38,6 +40,24 @@ module LanguageServer
|
|
38
40
|
attributes.fetch(:versionSupport)
|
39
41
|
end
|
40
42
|
|
43
|
+
#
|
44
|
+
# Client supports a codeDescription property
|
45
|
+
#
|
46
|
+
# @return [boolean]
|
47
|
+
def code_description_support
|
48
|
+
attributes.fetch(:codeDescriptionSupport)
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Whether code action supports the `data` property which is
|
53
|
+
# preserved between a `textDocument/publishDiagnostics` and
|
54
|
+
# `textDocument/codeAction` request.
|
55
|
+
#
|
56
|
+
# @return [boolean]
|
57
|
+
def data_support
|
58
|
+
attributes.fetch(:dataSupport)
|
59
|
+
end
|
60
|
+
|
41
61
|
attr_reader :attributes
|
42
62
|
|
43
63
|
def to_hash
|