language_server-protocol 3.14.0.1 → 3.16.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/lib/language_server/protocol/constant.rb +18 -0
- data/lib/language_server/protocol/constant/code_action_kind.rb +17 -11
- data/lib/language_server/protocol/constant/completion_item_tag.rb +16 -0
- data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -1
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +24 -0
- 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 +24 -0
- 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 -1
- data/lib/language_server/protocol/constant/token_format.rb +9 -0
- data/lib/language_server/protocol/interface.rb +270 -6
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +38 -0
- data/lib/language_server/protocol/interface/apply_workspace_edit_response.rb +24 -1
- 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 +31 -0
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +100 -0
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +25 -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 +31 -0
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +25 -0
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/change_annotation.rb +57 -0
- data/lib/language_server/protocol/interface/client_capabilities.rb +20 -2
- data/lib/language_server/protocol/interface/code_action.rb +52 -4
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +95 -0
- data/lib/language_server/protocol/interface/code_action_context.rb +8 -3
- data/lib/language_server/protocol/interface/code_action_options.rb +15 -7
- data/lib/language_server/protocol/interface/code_action_params.rb +3 -2
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +4 -1
- 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_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/code_lens_options.rb +3 -5
- data/lib/language_server/protocol/interface/code_lens_params.rb +3 -2
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +3 -10
- 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 +3 -2
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +59 -0
- data/lib/language_server/protocol/interface/completion_context.rb +5 -3
- data/lib/language_server/protocol/interface/completion_item.rb +71 -29
- data/lib/language_server/protocol/interface/completion_list.rb +2 -2
- data/lib/language_server/protocol/interface/completion_options.rb +36 -11
- data/lib/language_server/protocol/interface/completion_params.rb +5 -3
- data/lib/language_server/protocol/interface/completion_registration_options.rb +4 -26
- 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 +44 -0
- data/lib/language_server/protocol/interface/declaration_options.rb +25 -0
- data/lib/language_server/protocol/interface/declaration_params.rb +25 -0
- data/lib/language_server/protocol/interface/{folding_range_provider_options.rb → declaration_registration_options.rb} +3 -5
- data/lib/language_server/protocol/interface/definition_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/definition_options.rb +25 -0
- data/lib/language_server/protocol/interface/definition_params.rb +25 -0
- data/lib/language_server/protocol/interface/definition_registration_options.rb +25 -0
- 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 +31 -2
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
- data/lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/did_change_text_document_params.rb +13 -3
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +35 -0
- data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_color_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_color_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_color_params.rb +34 -0
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_filter.rb +7 -3
- data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_formatting_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_formatting_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_highlight.rb +1 -1
- data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_highlight_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_highlight_params.rb +25 -0
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_link.rb +17 -3
- data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/document_link_options.rb +3 -5
- data/lib/language_server/protocol/interface/document_link_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +3 -10
- data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +0 -3
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +1 -17
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +2 -18
- data/lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/document_range_formatting_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/document_symbol.rb +108 -0
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +73 -0
- data/lib/language_server/protocol/interface/document_symbol_options.rb +35 -0
- data/lib/language_server/protocol/interface/document_symbol_params.rb +3 -2
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +26 -0
- data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/execute_command_options.rb +3 -5
- data/lib/language_server/protocol/interface/execute_command_params.rb +3 -2
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +3 -10
- 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 +58 -0
- data/lib/language_server/protocol/interface/folding_range_options.rb +25 -0
- data/lib/language_server/protocol/interface/folding_range_params.rb +3 -2
- data/lib/language_server/protocol/interface/{color_provider_options.rb → folding_range_registration_options.rb} +3 -5
- data/lib/language_server/protocol/interface/formatting_options.rb +28 -1
- data/lib/language_server/protocol/interface/hover.rb +1 -1
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/hover_options.rb +25 -0
- data/lib/language_server/protocol/interface/hover_params.rb +25 -0
- data/lib/language_server/protocol/interface/hover_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/implementation_options.rb +25 -0
- data/lib/language_server/protocol/interface/implementation_params.rb +25 -0
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/initialize_params.rb +31 -8
- data/lib/language_server/protocol/interface/initialize_result.rb +10 -1
- 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 +25 -0
- data/lib/language_server/protocol/interface/linked_editing_range_params.rb +25 -0
- data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/linked_editing_ranges.rb +45 -0
- data/lib/language_server/protocol/interface/location_link.rb +11 -6
- 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 +25 -0
- data/lib/language_server/protocol/interface/moniker_params.rb +25 -0
- data/lib/language_server/protocol/interface/moniker_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/notification_message.rb +2 -1
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +42 -0
- data/lib/language_server/protocol/interface/parameter_information.rb +7 -5
- data/lib/language_server/protocol/interface/partial_result_params.rb +34 -0
- data/lib/language_server/protocol/interface/position.rb +5 -5
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +26 -0
- data/lib/language_server/protocol/interface/progress_params.rb +42 -0
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +73 -0
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +11 -1
- data/lib/language_server/protocol/interface/reference_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/reference_options.rb +25 -0
- data/lib/language_server/protocol/interface/reference_params.rb +3 -2
- data/lib/language_server/protocol/interface/reference_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +45 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +69 -0
- 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 +3 -5
- data/lib/language_server/protocol/interface/rename_params.rb +3 -20
- data/lib/language_server/protocol/interface/rename_registration_options.rb +3 -10
- data/lib/language_server/protocol/interface/request_message.rb +2 -1
- data/lib/language_server/protocol/interface/response_error.rb +2 -2
- data/lib/language_server/protocol/interface/response_message.rb +5 -4
- data/lib/language_server/protocol/interface/save_options.rb +0 -3
- data/lib/language_server/protocol/interface/selection_range.rb +43 -0
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +36 -0
- data/lib/language_server/protocol/interface/selection_range_options.rb +25 -0
- data/lib/language_server/protocol/interface/selection_range_params.rb +43 -0
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +25 -0
- 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 +44 -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 +53 -0
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +34 -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 +43 -0
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +39 -0
- data/lib/language_server/protocol/interface/server_capabilities.rb +108 -60
- 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 +7 -4
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +55 -0
- data/lib/language_server/protocol/interface/signature_help_context.rb +74 -0
- data/lib/language_server/protocol/interface/signature_help_options.rb +16 -5
- data/lib/language_server/protocol/interface/signature_help_params.rb +36 -0
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +4 -11
- data/lib/language_server/protocol/interface/signature_information.rb +12 -1
- data/lib/language_server/protocol/interface/symbol_information.rb +11 -2
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +2 -1
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +123 -86
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +10 -6
- data/lib/language_server/protocol/interface/text_document_edit.rb +2 -2
- data/lib/language_server/protocol/interface/text_document_registration_options.rb +6 -3
- data/lib/language_server/protocol/interface/text_document_save_registration_options.rb +1 -0
- data/lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb +62 -0
- data/lib/language_server/protocol/interface/text_document_sync_options.rb +14 -8
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/type_definition_options.rb +25 -0
- data/lib/language_server/protocol/interface/type_definition_params.rb +25 -0
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +25 -0
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +4 -7
- 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 +80 -0
- data/lib/language_server/protocol/interface/work_done_progress_cancel_params.rb +33 -0
- data/lib/language_server/protocol/interface/work_done_progress_create_params.rb +33 -0
- data/lib/language_server/protocol/interface/work_done_progress_end.rb +40 -0
- data/lib/language_server/protocol/interface/work_done_progress_options.rb +30 -0
- data/lib/language_server/protocol/interface/work_done_progress_params.rb +33 -0
- data/lib/language_server/protocol/interface/work_done_progress_report.rb +70 -0
- data/lib/language_server/protocol/interface/workspace_edit.rb +25 -8
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +75 -0
- data/lib/language_server/protocol/interface/workspace_folder.rb +2 -2
- data/lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb +48 -0
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +53 -0
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +25 -0
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +5 -3
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +25 -0
- data/lib/language_server/protocol/transport/io/reader.rb +1 -1
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +154 -35
- data/.gitignore +0 -10
- data/.travis.yml +0 -5
- data/CHANGELOG.md +0 -26
- data/CODE_OF_CONDUCT.md +0 -74
- data/Dockerfile-node.development +0 -6
- data/Dockerfile.development +0 -24
- data/Gemfile +0 -6
- data/Rakefile +0 -10
- data/bin/console +0 -14
- data/bin/generate_files +0 -5
- data/bin/m +0 -17
- data/bin/setup +0 -6
- data/circle.yml +0 -40
- data/docker-compose.ci.yml +0 -14
- data/docker-compose.override.yml +0 -16
- data/docker-compose.yml +0 -33
- data/language_server-protocol.gemspec +0 -33
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -104
- data/package.json +0 -10
- data/scripts/generateFiles.ts +0 -320
- data/yarn.lock +0 -293
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentRangeFormattingOptions < WorkDoneProgressOptions
|
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
|
+
attr_reader :attributes
|
14
|
+
|
15
|
+
def to_hash
|
16
|
+
attributes
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_json(*args)
|
20
|
+
to_hash.to_json(*args)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentRangeFormattingParams
|
5
|
-
def initialize(text_document:, range:, options:)
|
4
|
+
class DocumentRangeFormattingParams < WorkDoneProgressParams
|
5
|
+
def initialize(work_done_token: nil, text_document:, range:, options:)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
8
9
|
@attributes[:textDocument] = text_document
|
9
10
|
@attributes[:range] = range
|
10
11
|
@attributes[:options] = options
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentRangeFormattingRegistrationOptions < DocumentRangeFormattingOptions
|
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
|
+
attr_reader :attributes
|
14
|
+
|
15
|
+
def to_hash
|
16
|
+
attributes
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_json(*args)
|
20
|
+
to_hash.to_json(*args)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Represents programming constructs like variables, classes, interfaces etc.
|
6
|
+
# that appear in a document. Document symbols can be hierarchical and they
|
7
|
+
# have two ranges: one that encloses its definition and one that points to its
|
8
|
+
# most interesting range, e.g. the range of an identifier.
|
9
|
+
#
|
10
|
+
class DocumentSymbol
|
11
|
+
def initialize(name:, detail: nil, kind:, tags: nil, deprecated: nil, range:, selection_range:, children: nil)
|
12
|
+
@attributes = {}
|
13
|
+
|
14
|
+
@attributes[:name] = name
|
15
|
+
@attributes[:detail] = detail if detail
|
16
|
+
@attributes[:kind] = kind
|
17
|
+
@attributes[:tags] = tags if tags
|
18
|
+
@attributes[:deprecated] = deprecated if deprecated
|
19
|
+
@attributes[:range] = range
|
20
|
+
@attributes[:selectionRange] = selection_range
|
21
|
+
@attributes[:children] = children if children
|
22
|
+
|
23
|
+
@attributes.freeze
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# The name of this symbol. Will be displayed in the user interface and
|
28
|
+
# therefore must not be an empty string or a string only consisting of
|
29
|
+
# white spaces.
|
30
|
+
#
|
31
|
+
# @return [string]
|
32
|
+
def name
|
33
|
+
attributes.fetch(:name)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# More detail for this symbol, e.g the signature of a function.
|
38
|
+
#
|
39
|
+
# @return [string]
|
40
|
+
def detail
|
41
|
+
attributes.fetch(:detail)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The kind of this symbol.
|
46
|
+
#
|
47
|
+
# @return [any]
|
48
|
+
def kind
|
49
|
+
attributes.fetch(:kind)
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Tags for this document symbol.
|
54
|
+
#
|
55
|
+
# @return [1[]]
|
56
|
+
def tags
|
57
|
+
attributes.fetch(:tags)
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# Indicates if this symbol is deprecated.
|
62
|
+
#
|
63
|
+
# @return [boolean]
|
64
|
+
def deprecated
|
65
|
+
attributes.fetch(:deprecated)
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# The range enclosing this symbol not including leading/trailing whitespace
|
70
|
+
# but everything else like comments. This information is typically used to
|
71
|
+
# determine if the clients cursor is inside the symbol to reveal in the
|
72
|
+
# symbol in the UI.
|
73
|
+
#
|
74
|
+
# @return [Range]
|
75
|
+
def range
|
76
|
+
attributes.fetch(:range)
|
77
|
+
end
|
78
|
+
|
79
|
+
#
|
80
|
+
# The range that should be selected and revealed when this symbol is being
|
81
|
+
# picked, e.g. the name of a function. Must be contained by the `range`.
|
82
|
+
#
|
83
|
+
# @return [Range]
|
84
|
+
def selection_range
|
85
|
+
attributes.fetch(:selectionRange)
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
# Children of this symbol, e.g. properties of a class.
|
90
|
+
#
|
91
|
+
# @return [DocumentSymbol[]]
|
92
|
+
def children
|
93
|
+
attributes.fetch(:children)
|
94
|
+
end
|
95
|
+
|
96
|
+
attr_reader :attributes
|
97
|
+
|
98
|
+
def to_hash
|
99
|
+
attributes
|
100
|
+
end
|
101
|
+
|
102
|
+
def to_json(*args)
|
103
|
+
to_hash.to_json(*args)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentSymbolClientCapabilities
|
5
|
+
def initialize(dynamic_registration: nil, symbol_kind: nil, hierarchical_document_symbol_support: nil, tag_support: nil, label_support: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
9
|
+
@attributes[:symbolKind] = symbol_kind if symbol_kind
|
10
|
+
@attributes[:hierarchicalDocumentSymbolSupport] = hierarchical_document_symbol_support if hierarchical_document_symbol_support
|
11
|
+
@attributes[:tagSupport] = tag_support if tag_support
|
12
|
+
@attributes[:labelSupport] = label_support if label_support
|
13
|
+
|
14
|
+
@attributes.freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# Whether document symbol supports dynamic registration.
|
19
|
+
#
|
20
|
+
# @return [boolean]
|
21
|
+
def dynamic_registration
|
22
|
+
attributes.fetch(:dynamicRegistration)
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# Specific capabilities for the `SymbolKind` in the
|
27
|
+
# `textDocument/documentSymbol` request.
|
28
|
+
#
|
29
|
+
# @return [{ valueSet?: any[]; }]
|
30
|
+
def symbol_kind
|
31
|
+
attributes.fetch(:symbolKind)
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# The client supports hierarchical document symbols.
|
36
|
+
#
|
37
|
+
# @return [boolean]
|
38
|
+
def hierarchical_document_symbol_support
|
39
|
+
attributes.fetch(:hierarchicalDocumentSymbolSupport)
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# The client supports tags on `SymbolInformation`. Tags are supported on
|
44
|
+
# `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
|
45
|
+
# Clients supporting tags have to handle unknown tags gracefully.
|
46
|
+
#
|
47
|
+
# @return [{ valueSet: 1[]; }]
|
48
|
+
def tag_support
|
49
|
+
attributes.fetch(:tagSupport)
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# The client supports an additional label presented in the UI when
|
54
|
+
# registering a document symbol provider.
|
55
|
+
#
|
56
|
+
# @return [boolean]
|
57
|
+
def label_support
|
58
|
+
attributes.fetch(:labelSupport)
|
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,35 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentSymbolOptions < WorkDoneProgressOptions
|
5
|
+
def initialize(work_done_progress: nil, label: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
@attributes[:label] = label if label
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# A human-readable string that is shown when multiple outlines trees
|
16
|
+
# are shown for the same document.
|
17
|
+
#
|
18
|
+
# @return [string]
|
19
|
+
def label
|
20
|
+
attributes.fetch(:label)
|
21
|
+
end
|
22
|
+
|
23
|
+
attr_reader :attributes
|
24
|
+
|
25
|
+
def to_hash
|
26
|
+
attributes
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_json(*args)
|
30
|
+
to_hash.to_json(*args)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class DocumentSymbolParams
|
5
|
-
def initialize(text_document:)
|
4
|
+
class DocumentSymbolParams < PartialResultParams
|
5
|
+
def initialize(partial_result_token: nil, text_document:)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
8
9
|
@attributes[:textDocument] = text_document
|
9
10
|
|
10
11
|
@attributes.freeze
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class DocumentSymbolRegistrationOptions < DocumentSymbolOptions
|
5
|
+
def initialize(work_done_progress: nil, label: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
@attributes[:label] = label if label
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
attr_reader :attributes
|
15
|
+
|
16
|
+
def to_hash
|
17
|
+
attributes
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_json(*args)
|
21
|
+
to_hash.to_json(*args)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class ExecuteCommandClientCapabilities
|
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
|
+
# Execute command supports dynamic registration.
|
15
|
+
#
|
16
|
+
# @return [boolean]
|
17
|
+
def dynamic_registration
|
18
|
+
attributes.fetch(:dynamicRegistration)
|
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
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
class ExecuteCommandOptions
|
8
|
-
def initialize(commands:)
|
4
|
+
class ExecuteCommandOptions < WorkDoneProgressOptions
|
5
|
+
def initialize(work_done_progress: nil, commands:)
|
9
6
|
@attributes = {}
|
10
7
|
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
11
9
|
@attributes[:commands] = commands
|
12
10
|
|
13
11
|
@attributes.freeze
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
class ExecuteCommandParams
|
5
|
-
def initialize(command:, arguments: nil)
|
4
|
+
class ExecuteCommandParams < WorkDoneProgressParams
|
5
|
+
def initialize(work_done_token: nil, command:, arguments: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
8
9
|
@attributes[:command] = command
|
9
10
|
@attributes[:arguments] = arguments if arguments
|
10
11
|
|
@@ -4,23 +4,16 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# Execute command registration options.
|
6
6
|
#
|
7
|
-
class ExecuteCommandRegistrationOptions
|
8
|
-
def initialize(commands:)
|
7
|
+
class ExecuteCommandRegistrationOptions < ExecuteCommandOptions
|
8
|
+
def initialize(work_done_progress: nil, commands:)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
11
12
|
@attributes[:commands] = commands
|
12
13
|
|
13
14
|
@attributes.freeze
|
14
15
|
end
|
15
16
|
|
16
|
-
#
|
17
|
-
# The commands to be executed on the server
|
18
|
-
#
|
19
|
-
# @return [string[]]
|
20
|
-
def commands
|
21
|
-
attributes.fetch(:commands)
|
22
|
-
end
|
23
|
-
|
24
17
|
attr_reader :attributes
|
25
18
|
|
26
19
|
def to_hash
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Represents information on a file/folder create.
|
6
|
+
#
|
7
|
+
class FileCreate
|
8
|
+
def initialize(uri:)
|
9
|
+
@attributes = {}
|
10
|
+
|
11
|
+
@attributes[:uri] = uri
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# A file:// URI for the location of the file/folder being created.
|
18
|
+
#
|
19
|
+
# @return [string]
|
20
|
+
def uri
|
21
|
+
attributes.fetch(:uri)
|
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
|