language_server-protocol 3.14.0.2 → 3.16.0.1
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.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 +56 -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 +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 +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 +19 -6
- data/lib/language_server/protocol/interface/code_action_params.rb +20 -1
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +39 -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_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/code_lens_options.rb +7 -4
- data/lib/language_server/protocol/interface/code_lens_params.rb +20 -1
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +17 -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 -1
- 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 +39 -9
- data/lib/language_server/protocol/interface/completion_params.rb +39 -3
- data/lib/language_server/protocol/interface/completion_registration_options.rb +41 -9
- 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 +30 -0
- data/lib/language_server/protocol/interface/declaration_params.rb +61 -0
- data/lib/language_server/protocol/interface/declaration_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/definition_client_capabilities.rb +42 -0
- data/lib/language_server/protocol/interface/definition_options.rb +30 -0
- data/lib/language_server/protocol/interface/definition_params.rb +61 -0
- data/lib/language_server/protocol/interface/definition_registration_options.rb +40 -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 +30 -0
- data/lib/language_server/protocol/interface/document_color_params.rb +52 -0
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +50 -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 +30 -0
- data/lib/language_server/protocol/interface/document_formatting_params.rb +10 -1
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +40 -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 +30 -0
- data/lib/language_server/protocol/interface/document_highlight_params.rb +61 -0
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +40 -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 +7 -4
- data/lib/language_server/protocol/interface/document_link_params.rb +20 -1
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +17 -2
- 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 +2 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +10 -1
- 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 +30 -0
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +10 -1
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +40 -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 +40 -0
- data/lib/language_server/protocol/interface/document_symbol_params.rb +20 -1
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +33 -0
- data/lib/language_server/protocol/interface/execute_command_options.rb +7 -4
- data/lib/language_server/protocol/interface/execute_command_params.rb +10 -1
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +7 -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 +58 -0
- data/lib/language_server/protocol/interface/folding_range_options.rb +30 -0
- data/lib/language_server/protocol/interface/folding_range_params.rb +20 -1
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +50 -0
- 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 +30 -0
- data/lib/language_server/protocol/interface/hover_params.rb +51 -0
- data/lib/language_server/protocol/interface/hover_registration_options.rb +40 -0
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/implementation_options.rb +30 -0
- data/lib/language_server/protocol/interface/implementation_params.rb +61 -0
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +50 -0
- data/lib/language_server/protocol/interface/initialize_params.rb +38 -7
- 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 +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 +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 +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 +7 -2
- 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 +34 -0
- data/lib/language_server/protocol/interface/position.rb +5 -5
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +42 -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 +30 -0
- data/lib/language_server/protocol/interface/reference_params.rb +37 -2
- data/lib/language_server/protocol/interface/reference_registration_options.rb +40 -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 +7 -4
- data/lib/language_server/protocol/interface/rename_params.rb +12 -3
- data/lib/language_server/protocol/interface/rename_registration_options.rb +18 -3
- data/lib/language_server/protocol/interface/request_message.rb +7 -2
- data/lib/language_server/protocol/interface/response_error.rb +2 -2
- data/lib/language_server/protocol/interface/response_message.rb +10 -5
- 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 +30 -0
- data/lib/language_server/protocol/interface/selection_range_params.rb +61 -0
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +50 -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 +62 -0
- data/lib/language_server/protocol/interface/{folding_range_provider_options.rb → semantic_tokens_delta_partial_result.rb} +8 -5
- 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/{color_provider_options.rb → semantic_tokens_partial_result.rb} +8 -5
- 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 +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 +20 -4
- data/lib/language_server/protocol/interface/signature_help_params.rb +62 -0
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +30 -2
- 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 +11 -2
- 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 +10 -1
- 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 +30 -0
- data/lib/language_server/protocol/interface/type_definition_params.rb +61 -0
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +50 -0
- 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 +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 +30 -0
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +22 -2
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +30 -0
- data/lib/language_server/protocol/transport/io/reader.rb +1 -1
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +154 -15
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -104
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkDoneProgressCancelParams
|
5
|
+
def initialize(token:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:token] = token
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# The token to be used to report progress.
|
15
|
+
#
|
16
|
+
# @return [ProgressToken]
|
17
|
+
def token
|
18
|
+
attributes.fetch(:token)
|
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
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkDoneProgressCreateParams
|
5
|
+
def initialize(token:)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:token] = token
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# The token to be used to report progress.
|
15
|
+
#
|
16
|
+
# @return [ProgressToken]
|
17
|
+
def token
|
18
|
+
attributes.fetch(:token)
|
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
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkDoneProgressEnd
|
5
|
+
def initialize(kind:, message: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:kind] = kind
|
9
|
+
@attributes[:message] = message if message
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return ["end"]
|
15
|
+
def kind
|
16
|
+
attributes.fetch(:kind)
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Optional, a final message indicating to for example indicate the outcome
|
21
|
+
# of the operation.
|
22
|
+
#
|
23
|
+
# @return [string]
|
24
|
+
def message
|
25
|
+
attributes.fetch(:message)
|
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
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class 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
|
+
# @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,33 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkDoneProgressParams
|
5
|
+
def initialize(work_done_token: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
|
+
|
10
|
+
@attributes.freeze
|
11
|
+
end
|
12
|
+
|
13
|
+
#
|
14
|
+
# An optional token that a server can use to report work done progress.
|
15
|
+
#
|
16
|
+
# @return [ProgressToken]
|
17
|
+
def work_done_token
|
18
|
+
attributes.fetch(:workDoneToken)
|
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
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkDoneProgressReport
|
5
|
+
def initialize(kind:, cancellable: nil, message: nil, percentage: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:kind] = kind
|
9
|
+
@attributes[:cancellable] = cancellable if cancellable
|
10
|
+
@attributes[:message] = message if message
|
11
|
+
@attributes[:percentage] = percentage if percentage
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return ["report"]
|
17
|
+
def kind
|
18
|
+
attributes.fetch(:kind)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# Controls enablement state of a cancel button. This property is only valid
|
23
|
+
# if a cancel button got requested in the `WorkDoneProgressStart` payload.
|
24
|
+
#
|
25
|
+
# Clients that don't support cancellation or don't support control the
|
26
|
+
# button's enablement state are allowed to ignore the setting.
|
27
|
+
#
|
28
|
+
# @return [boolean]
|
29
|
+
def cancellable
|
30
|
+
attributes.fetch(:cancellable)
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Optional, more detailed associated progress message. Contains
|
35
|
+
# complementary information to the `title`.
|
36
|
+
#
|
37
|
+
# Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
|
38
|
+
# If unset, the previous progress message (if any) is still valid.
|
39
|
+
#
|
40
|
+
# @return [string]
|
41
|
+
def message
|
42
|
+
attributes.fetch(:message)
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Optional progress percentage to display (value 100 is considered 100%).
|
47
|
+
# If not provided infinite progress is assumed and clients are allowed
|
48
|
+
# to ignore the `percentage` value in subsequent in report notifications.
|
49
|
+
#
|
50
|
+
# The value should be steadily rising. Clients are free to ignore values
|
51
|
+
# that are not following this rule. The value range is [0, 100]
|
52
|
+
#
|
53
|
+
# @return [number]
|
54
|
+
def percentage
|
55
|
+
attributes.fetch(:percentage)
|
56
|
+
end
|
57
|
+
|
58
|
+
attr_reader :attributes
|
59
|
+
|
60
|
+
def to_hash
|
61
|
+
attributes
|
62
|
+
end
|
63
|
+
|
64
|
+
def to_json(*args)
|
65
|
+
to_hash.to_json(*args)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -2,11 +2,12 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class WorkspaceEdit
|
5
|
-
def initialize(changes: nil, document_changes: nil)
|
5
|
+
def initialize(changes: nil, document_changes: nil, change_annotations: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
8
|
@attributes[:changes] = changes if changes
|
9
9
|
@attributes[:documentChanges] = document_changes if document_changes
|
10
|
+
@attributes[:changeAnnotations] = change_annotations if change_annotations
|
10
11
|
|
11
12
|
@attributes.freeze
|
12
13
|
end
|
@@ -14,28 +15,44 @@ module LanguageServer
|
|
14
15
|
#
|
15
16
|
# Holds changes to existing resources.
|
16
17
|
#
|
17
|
-
# @return [{
|
18
|
+
# @return [{}]
|
18
19
|
def changes
|
19
20
|
attributes.fetch(:changes)
|
20
21
|
end
|
21
22
|
|
22
23
|
#
|
23
|
-
# Depending on the client capability
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
24
|
+
# Depending on the client capability
|
25
|
+
# `workspace.workspaceEdit.resourceOperations` document changes are either
|
26
|
+
# an array of `TextDocumentEdit`s to express changes to n different text
|
27
|
+
# documents where each text document edit addresses a specific version of
|
28
|
+
# a text document. Or it can contain above `TextDocumentEdit`s mixed with
|
29
|
+
# create, rename and delete file / folder operations.
|
27
30
|
#
|
28
31
|
# Whether a client supports versioned document edits is expressed via
|
29
32
|
# `workspace.workspaceEdit.documentChanges` client capability.
|
30
33
|
#
|
31
|
-
# If a client neither supports `documentChanges` nor
|
32
|
-
# only plain `TextEdit`s
|
34
|
+
# If a client neither supports `documentChanges` nor
|
35
|
+
# `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s
|
36
|
+
# using the `changes` property are supported.
|
33
37
|
#
|
34
38
|
# @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]]
|
35
39
|
def document_changes
|
36
40
|
attributes.fetch(:documentChanges)
|
37
41
|
end
|
38
42
|
|
43
|
+
#
|
44
|
+
# A map of change annotations that can be referenced in
|
45
|
+
# `AnnotatedTextEdit`s or create, rename and delete file / folder
|
46
|
+
# operations.
|
47
|
+
#
|
48
|
+
# Whether clients honor this property depends on the client capability
|
49
|
+
# `workspace.changeAnnotationSupport`.
|
50
|
+
#
|
51
|
+
# @return [{ [id: string]: ChangeAnnotation; }]
|
52
|
+
def change_annotations
|
53
|
+
attributes.fetch(:changeAnnotations)
|
54
|
+
end
|
55
|
+
|
39
56
|
attr_reader :attributes
|
40
57
|
|
41
58
|
def to_hash
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkspaceEditClientCapabilities
|
5
|
+
def initialize(document_changes: nil, resource_operations: nil, failure_handling: nil, normalizes_line_endings: nil, change_annotation_support: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:documentChanges] = document_changes if document_changes
|
9
|
+
@attributes[:resourceOperations] = resource_operations if resource_operations
|
10
|
+
@attributes[:failureHandling] = failure_handling if failure_handling
|
11
|
+
@attributes[:normalizesLineEndings] = normalizes_line_endings if normalizes_line_endings
|
12
|
+
@attributes[:changeAnnotationSupport] = change_annotation_support if change_annotation_support
|
13
|
+
|
14
|
+
@attributes.freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
#
|
18
|
+
# The client supports versioned document changes in `WorkspaceEdit`s
|
19
|
+
#
|
20
|
+
# @return [boolean]
|
21
|
+
def document_changes
|
22
|
+
attributes.fetch(:documentChanges)
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# The resource operations the client supports. Clients should at least
|
27
|
+
# support 'create', 'rename' and 'delete' files and folders.
|
28
|
+
#
|
29
|
+
# @return [ResourceOperationKind[]]
|
30
|
+
def resource_operations
|
31
|
+
attributes.fetch(:resourceOperations)
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# The failure handling strategy of a client if applying the workspace edit
|
36
|
+
# fails.
|
37
|
+
#
|
38
|
+
# @return [FailureHandlingKind]
|
39
|
+
def failure_handling
|
40
|
+
attributes.fetch(:failureHandling)
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Whether the client normalizes line endings to the client specific
|
45
|
+
# setting.
|
46
|
+
# If set to `true` the client will normalize line ending characters
|
47
|
+
# in a workspace edit to the client specific new line character(s).
|
48
|
+
#
|
49
|
+
# @return [boolean]
|
50
|
+
def normalizes_line_endings
|
51
|
+
attributes.fetch(:normalizesLineEndings)
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Whether the client in general supports change annotations on text edits,
|
56
|
+
# create file, rename file and delete file changes.
|
57
|
+
#
|
58
|
+
# @return [{ groupsOnLabel?: boolean; }]
|
59
|
+
def change_annotation_support
|
60
|
+
attributes.fetch(:changeAnnotationSupport)
|
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
|
@@ -20,8 +20,8 @@ module LanguageServer
|
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
23
|
-
# The name of the workspace folder.
|
24
|
-
#
|
23
|
+
# The name of the workspace folder. Used to refer to this
|
24
|
+
# workspace folder in the user interface.
|
25
25
|
#
|
26
26
|
# @return [string]
|
27
27
|
def name
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class WorkspaceFoldersServerCapabilities
|
5
|
+
def initialize(supported: nil, change_notifications: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:supported] = supported if supported
|
9
|
+
@attributes[:changeNotifications] = change_notifications if change_notifications
|
10
|
+
|
11
|
+
@attributes.freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
#
|
15
|
+
# The server has support for workspace folders
|
16
|
+
#
|
17
|
+
# @return [boolean]
|
18
|
+
def supported
|
19
|
+
attributes.fetch(:supported)
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# Whether the server wants to receive workspace folder
|
24
|
+
# change notifications.
|
25
|
+
#
|
26
|
+
# If a string is provided, the string is treated as an ID
|
27
|
+
# under which the notification is registered on the client
|
28
|
+
# side. The ID can be used to unregister for these events
|
29
|
+
# using the `client/unregisterCapability` request.
|
30
|
+
#
|
31
|
+
# @return [string | boolean]
|
32
|
+
def change_notifications
|
33
|
+
attributes.fetch(:changeNotifications)
|
34
|
+
end
|
35
|
+
|
36
|
+
attr_reader :attributes
|
37
|
+
|
38
|
+
def to_hash
|
39
|
+
attributes
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_json(*args)
|
43
|
+
to_hash.to_json(*args)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|