language_server-protocol 3.17.0.0 → 3.17.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/language_server/protocol/constant/code_action_kind.rb +29 -22
- data/lib/language_server/protocol/constant/code_action_trigger_kind.rb +0 -2
- data/lib/language_server/protocol/constant/completion_item_tag.rb +2 -4
- data/lib/language_server/protocol/constant/completion_trigger_kind.rb +3 -2
- data/lib/language_server/protocol/constant/diagnostic_severity.rb +0 -3
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +2 -4
- data/lib/language_server/protocol/constant/document_diagnostic_report_kind.rb +21 -0
- data/lib/language_server/protocol/constant/error_codes.rb +42 -16
- data/lib/language_server/protocol/constant/failure_handling_kind.rb +10 -9
- data/lib/language_server/protocol/constant/file_change_type.rb +1 -1
- data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +2 -4
- data/lib/language_server/protocol/constant/folding_range_kind.rb +5 -4
- data/lib/language_server/protocol/constant/initialize_error_codes.rb +16 -0
- data/lib/language_server/protocol/constant/inlay_hint_kind.rb +0 -2
- data/lib/language_server/protocol/constant/insert_text_format.rb +0 -2
- data/lib/language_server/protocol/constant/insert_text_mode.rb +0 -2
- data/lib/language_server/protocol/constant/markup_kind.rb +2 -2
- data/lib/language_server/protocol/constant/message_type.rb +0 -3
- data/lib/language_server/protocol/constant/moniker_kind.rb +3 -5
- data/lib/language_server/protocol/constant/notebook_cell_kind.rb +0 -2
- data/lib/language_server/protocol/constant/position_encoding_kind.rb +5 -5
- data/lib/language_server/protocol/constant/prepare_support_default_behavior.rb +1 -1
- data/lib/language_server/protocol/constant/resource_operation_kind.rb +6 -3
- data/lib/language_server/protocol/constant/semantic_token_modifiers.rb +10 -17
- data/lib/language_server/protocol/constant/semantic_token_types.rb +25 -35
- data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +2 -3
- data/lib/language_server/protocol/constant/symbol_tag.rb +0 -2
- data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
- data/lib/language_server/protocol/constant/text_document_sync_kind.rb +3 -3
- data/lib/language_server/protocol/constant/token_format.rb +1 -1
- data/lib/language_server/protocol/constant/uniqueness_level.rb +5 -7
- data/lib/language_server/protocol/constant.rb +6 -4
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +10 -12
- data/lib/language_server/protocol/interface/apply_workspace_edit_params.rb +1 -4
- data/lib/language_server/protocol/interface/apply_workspace_edit_result.rb +6 -10
- data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +5 -7
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +0 -5
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +11 -16
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +9 -13
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +1 -6
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +2 -8
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +11 -16
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +1 -6
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +5 -10
- data/lib/language_server/protocol/interface/cancel_params.rb +1 -1
- data/lib/language_server/protocol/interface/change_annotation.rb +2 -4
- data/lib/language_server/protocol/interface/client_capabilities.rb +6 -13
- data/lib/language_server/protocol/interface/code_action.rb +26 -28
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +9 -25
- data/lib/language_server/protocol/interface/code_action_context.rb +10 -11
- data/lib/language_server/protocol/interface/code_action_options.rb +11 -16
- data/lib/language_server/protocol/interface/code_action_params.rb +21 -21
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +14 -19
- data/lib/language_server/protocol/interface/code_description.rb +1 -3
- data/lib/language_server/protocol/interface/code_lens.rb +9 -8
- data/lib/language_server/protocol/interface/code_lens_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/code_lens_options.rb +8 -11
- data/lib/language_server/protocol/interface/code_lens_params.rb +14 -17
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +11 -14
- data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/color.rb +4 -4
- data/lib/language_server/protocol/interface/color_information.rb +0 -3
- data/lib/language_server/protocol/interface/color_presentation.rb +9 -8
- data/lib/language_server/protocol/interface/color_presentation_params.rb +21 -24
- data/lib/language_server/protocol/interface/command.rb +1 -7
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +16 -24
- data/lib/language_server/protocol/interface/completion_context.rb +6 -4
- data/lib/language_server/protocol/interface/completion_item.rb +50 -61
- data/lib/language_server/protocol/interface/completion_item_label_details.rb +8 -8
- data/lib/language_server/protocol/interface/completion_list.rb +5 -6
- data/lib/language_server/protocol/interface/completion_options.rb +26 -27
- data/lib/language_server/protocol/interface/completion_params.rb +16 -18
- data/lib/language_server/protocol/interface/completion_registration_options.rb +29 -33
- data/lib/language_server/protocol/interface/configuration_item.rb +2 -2
- data/lib/language_server/protocol/interface/configuration_params.rb +0 -3
- data/lib/language_server/protocol/interface/create_file.rb +4 -6
- data/lib/language_server/protocol/interface/create_file_options.rb +2 -2
- data/lib/language_server/protocol/interface/create_files_params.rb +2 -4
- data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +5 -8
- data/lib/language_server/protocol/interface/declaration_options.rb +1 -1
- data/lib/language_server/protocol/interface/declaration_params.rb +4 -4
- data/lib/language_server/protocol/interface/declaration_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/definition_client_capabilities.rb +2 -7
- data/lib/language_server/protocol/interface/definition_options.rb +1 -4
- data/lib/language_server/protocol/interface/definition_params.rb +4 -7
- data/lib/language_server/protocol/interface/definition_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/delete_file.rb +3 -5
- data/lib/language_server/protocol/interface/delete_file_options.rb +2 -2
- data/lib/language_server/protocol/interface/delete_files_params.rb +2 -4
- data/lib/language_server/protocol/interface/diagnostic.rb +14 -25
- data/lib/language_server/protocol/interface/diagnostic_client_capabilities.rb +7 -7
- data/lib/language_server/protocol/interface/diagnostic_options.rb +8 -10
- data/lib/language_server/protocol/interface/diagnostic_registration_options.rb +12 -14
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
- data/lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb +0 -2
- data/lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb +4 -6
- data/lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/did_change_configuration_params.rb +0 -3
- data/lib/language_server/protocol/interface/did_change_notebook_document_params.rb +8 -14
- data/lib/language_server/protocol/interface/did_change_text_document_params.rb +11 -12
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +6 -8
- data/lib/language_server/protocol/interface/did_change_watched_files_params.rb +0 -3
- data/lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb +1 -1
- data/lib/language_server/protocol/interface/did_change_workspace_folders_params.rb +0 -3
- data/lib/language_server/protocol/interface/did_close_notebook_document_params.rb +0 -2
- data/lib/language_server/protocol/interface/did_close_text_document_params.rb +0 -3
- data/lib/language_server/protocol/interface/did_open_notebook_document_params.rb +0 -2
- data/lib/language_server/protocol/interface/did_open_text_document_params.rb +0 -3
- data/lib/language_server/protocol/interface/did_save_notebook_document_params.rb +0 -2
- data/lib/language_server/protocol/interface/did_save_text_document_params.rb +1 -4
- data/lib/language_server/protocol/interface/document_color_client_capabilities.rb +2 -4
- data/lib/language_server/protocol/interface/document_color_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_color_params.rb +14 -17
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +11 -11
- data/lib/language_server/protocol/interface/document_diagnostic_params.rb +22 -24
- data/lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb +1 -3
- data/lib/language_server/protocol/interface/document_filter.rb +19 -25
- data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/document_formatting_options.rb +1 -4
- data/lib/language_server/protocol/interface/document_formatting_params.rb +10 -13
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/document_highlight.rb +2 -2
- data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/document_highlight_options.rb +1 -4
- data/lib/language_server/protocol/interface/document_highlight_params.rb +4 -7
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/document_link.rb +9 -10
- data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +2 -7
- data/lib/language_server/protocol/interface/document_link_options.rb +8 -11
- data/lib/language_server/protocol/interface/document_link_params.rb +14 -17
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +11 -14
- data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +1 -4
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +0 -3
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb +2 -5
- data/lib/language_server/protocol/interface/document_range_formatting_options.rb +1 -4
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +10 -13
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/document_symbol.rb +15 -17
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +5 -12
- data/lib/language_server/protocol/interface/document_symbol_options.rb +8 -13
- data/lib/language_server/protocol/interface/document_symbol_params.rb +14 -17
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +11 -16
- data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/execute_command_options.rb +7 -10
- data/lib/language_server/protocol/interface/execute_command_params.rb +11 -14
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +8 -8
- data/lib/language_server/protocol/interface/execution_summary.rb +2 -2
- data/lib/language_server/protocol/interface/file_create.rb +0 -2
- data/lib/language_server/protocol/interface/file_delete.rb +0 -2
- data/lib/language_server/protocol/interface/file_event.rb +3 -3
- data/lib/language_server/protocol/interface/file_operation_filter.rb +3 -5
- data/lib/language_server/protocol/interface/file_operation_pattern.rb +10 -8
- data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +1 -3
- data/lib/language_server/protocol/interface/file_operation_registration_options.rb +0 -2
- data/lib/language_server/protocol/interface/file_rename.rb +0 -2
- data/lib/language_server/protocol/interface/file_system_watcher.rb +3 -4
- data/lib/language_server/protocol/interface/folding_range.rb +23 -19
- data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +5 -9
- data/lib/language_server/protocol/interface/folding_range_options.rb +1 -1
- data/lib/language_server/protocol/interface/folding_range_params.rb +14 -17
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/formatting_options.rb +4 -10
- data/lib/language_server/protocol/interface/full_document_diagnostic_report.rb +2 -4
- data/lib/language_server/protocol/interface/hover.rb +3 -3
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +5 -4
- data/lib/language_server/protocol/interface/hover_options.rb +1 -4
- data/lib/language_server/protocol/interface/hover_params.rb +1 -4
- data/lib/language_server/protocol/interface/hover_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/{t.rb → hover_result.rb} +8 -2
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +5 -10
- data/lib/language_server/protocol/interface/implementation_options.rb +1 -1
- data/lib/language_server/protocol/interface/implementation_params.rb +4 -4
- data/lib/language_server/protocol/interface/implementation_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/initialize_error.rb +0 -4
- data/lib/language_server/protocol/interface/initialize_params.rb +29 -41
- data/lib/language_server/protocol/interface/initialize_result.rb +1 -6
- data/lib/language_server/protocol/interface/inlay_hint.rb +13 -9
- data/lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb +3 -5
- data/lib/language_server/protocol/interface/inlay_hint_label_part.rb +3 -5
- data/lib/language_server/protocol/interface/inlay_hint_options.rb +8 -10
- data/lib/language_server/protocol/interface/inlay_hint_params.rb +11 -13
- data/lib/language_server/protocol/interface/inlay_hint_registration_options.rb +12 -14
- data/lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb +1 -3
- data/lib/language_server/protocol/interface/inline_value_client_capabilities.rb +3 -4
- data/lib/language_server/protocol/interface/inline_value_context.rb +3 -5
- data/lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb +7 -5
- data/lib/language_server/protocol/interface/inline_value_options.rb +1 -3
- data/lib/language_server/protocol/interface/inline_value_params.rb +10 -12
- data/lib/language_server/protocol/interface/inline_value_registration_options.rb +5 -7
- data/lib/language_server/protocol/interface/inline_value_text.rb +0 -2
- data/lib/language_server/protocol/interface/inline_value_variable_lookup.rb +7 -5
- data/lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb +5 -7
- data/lib/language_server/protocol/interface/insert_replace_edit.rb +0 -2
- data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +4 -8
- data/lib/language_server/protocol/interface/linked_editing_range_options.rb +1 -1
- data/lib/language_server/protocol/interface/linked_editing_range_params.rb +1 -1
- data/lib/language_server/protocol/interface/linked_editing_range_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/linked_editing_ranges.rb +7 -11
- data/lib/language_server/protocol/interface/location.rb +1 -5
- data/lib/language_server/protocol/interface/location_link.rb +11 -13
- data/lib/language_server/protocol/interface/log_message_params.rb +1 -4
- data/lib/language_server/protocol/interface/log_trace_params.rb +8 -1
- data/lib/language_server/protocol/interface/markup_content.rb +18 -16
- data/lib/language_server/protocol/interface/{lsp_object.rb → message.rb} +8 -6
- data/lib/language_server/protocol/interface/moniker.rb +1 -3
- data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +5 -9
- data/lib/language_server/protocol/interface/moniker_options.rb +1 -1
- data/lib/language_server/protocol/interface/moniker_params.rb +4 -4
- data/lib/language_server/protocol/interface/moniker_registration_options.rb +4 -4
- data/lib/language_server/protocol/interface/notebook_cell.rb +4 -8
- data/lib/language_server/protocol/interface/notebook_cell_array_change.rb +4 -6
- data/lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb +1 -3
- data/lib/language_server/protocol/interface/notebook_document.rb +4 -8
- data/lib/language_server/protocol/interface/notebook_document_change_event.rb +2 -6
- data/lib/language_server/protocol/interface/notebook_document_client_capabilities.rb +0 -4
- data/lib/language_server/protocol/interface/notebook_document_filter.rb +32 -11
- data/lib/language_server/protocol/interface/notebook_document_identifier.rb +2 -4
- data/lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb +2 -4
- data/lib/language_server/protocol/interface/notebook_document_sync_options.rb +3 -5
- data/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb +3 -5
- data/lib/language_server/protocol/interface/notification_message.rb +48 -0
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +18 -17
- data/lib/language_server/protocol/interface/parameter_information.rb +9 -7
- data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
- data/lib/language_server/protocol/interface/position.rb +6 -40
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +1 -1
- data/lib/language_server/protocol/interface/previous_result_id.rb +1 -3
- data/lib/language_server/protocol/interface/progress_params.rb +1 -1
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +5 -16
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +4 -8
- data/lib/language_server/protocol/interface/range.rb +0 -13
- data/lib/language_server/protocol/interface/reference_client_capabilities.rb +1 -4
- data/lib/language_server/protocol/interface/reference_context.rb +0 -4
- data/lib/language_server/protocol/interface/reference_options.rb +1 -4
- data/lib/language_server/protocol/interface/reference_params.rb +11 -14
- data/lib/language_server/protocol/interface/reference_registration_options.rb +4 -7
- data/lib/language_server/protocol/interface/registration.rb +2 -2
- data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +1 -3
- data/lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb +16 -20
- data/lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb +15 -19
- data/lib/language_server/protocol/interface/relative_pattern.rb +2 -4
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +7 -12
- data/lib/language_server/protocol/interface/rename_file.rb +4 -6
- data/lib/language_server/protocol/interface/rename_file_options.rb +2 -2
- data/lib/language_server/protocol/interface/rename_files_params.rb +4 -6
- data/lib/language_server/protocol/interface/rename_options.rb +8 -13
- data/lib/language_server/protocol/interface/rename_params.rb +12 -15
- data/lib/language_server/protocol/interface/rename_registration_options.rb +11 -16
- data/lib/language_server/protocol/interface/request_message.rb +57 -0
- data/lib/language_server/protocol/interface/response_error.rb +52 -0
- data/lib/language_server/protocol/interface/response_message.rb +58 -0
- data/lib/language_server/protocol/interface/save_options.rb +1 -4
- data/lib/language_server/protocol/interface/selection_range.rb +3 -6
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +5 -4
- data/lib/language_server/protocol/interface/selection_range_options.rb +1 -1
- data/lib/language_server/protocol/interface/selection_range_params.rb +20 -23
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/semantic_tokens.rb +2 -5
- data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +13 -19
- data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +3 -5
- data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +21 -24
- data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +0 -3
- data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +3 -6
- data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +0 -3
- data/lib/language_server/protocol/interface/semantic_tokens_options.rb +9 -12
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +14 -17
- data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +1 -4
- data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +20 -23
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +13 -16
- data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +2 -5
- data/lib/language_server/protocol/interface/server_capabilities.rb +66 -89
- data/lib/language_server/protocol/interface/set_trace_params.rb +4 -1
- data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +2 -4
- data/lib/language_server/protocol/interface/show_document_params.rb +4 -6
- data/lib/language_server/protocol/interface/show_document_result.rb +1 -3
- data/lib/language_server/protocol/interface/show_message_params.rb +1 -4
- data/lib/language_server/protocol/interface/show_message_request_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/interface/show_message_request_params.rb +2 -2
- data/lib/language_server/protocol/interface/signature_help.rb +6 -5
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +3 -8
- data/lib/language_server/protocol/interface/signature_help_context.rb +11 -10
- data/lib/language_server/protocol/interface/signature_help_options.rb +14 -17
- data/lib/language_server/protocol/interface/signature_help_params.rb +13 -17
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +17 -20
- data/lib/language_server/protocol/interface/signature_information.rb +3 -5
- data/lib/language_server/protocol/interface/static_registration_options.rb +2 -3
- data/lib/language_server/protocol/interface/symbol_information.rb +29 -33
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +13 -12
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +47 -76
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +8 -6
- data/lib/language_server/protocol/interface/text_document_edit.rb +1 -10
- data/lib/language_server/protocol/interface/text_document_identifier.rb +2 -5
- data/lib/language_server/protocol/interface/text_document_item.rb +3 -7
- data/lib/language_server/protocol/interface/text_document_position_params.rb +0 -4
- 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 +4 -7
- data/lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb +4 -4
- data/lib/language_server/protocol/interface/text_document_sync_options.rb +19 -15
- data/lib/language_server/protocol/interface/text_edit.rb +0 -3
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +5 -10
- data/lib/language_server/protocol/interface/type_definition_options.rb +1 -1
- data/lib/language_server/protocol/interface/type_definition_params.rb +4 -4
- data/lib/language_server/protocol/interface/type_definition_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/type_hierarchy_item.rb +4 -7
- data/lib/language_server/protocol/interface/type_hierarchy_options.rb +1 -6
- data/lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb +1 -6
- data/lib/language_server/protocol/interface/type_hierarchy_registration_options.rb +5 -10
- data/lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb +11 -16
- data/lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb +11 -16
- data/lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb +1 -3
- data/lib/language_server/protocol/interface/unregistration.rb +2 -2
- data/lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb +3 -5
- data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +13 -13
- 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 +6 -6
- data/lib/language_server/protocol/interface/work_done_progress_end.rb +1 -1
- data/lib/language_server/protocol/interface/work_done_progress_options.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 +7 -6
- data/lib/language_server/protocol/interface/workspace_diagnostic_params.rb +21 -23
- data/lib/language_server/protocol/interface/workspace_diagnostic_report.rb +0 -2
- data/lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb +0 -2
- data/lib/language_server/protocol/interface/workspace_edit.rb +17 -28
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +6 -15
- data/lib/language_server/protocol/interface/workspace_folder.rb +1 -4
- data/lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb +3 -3
- data/lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb +22 -24
- data/lib/language_server/protocol/interface/workspace_symbol.rb +28 -34
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +7 -13
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +8 -13
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +16 -16
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +8 -13
- data/lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb +21 -23
- data/lib/language_server/protocol/interface.rb +16 -38
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +10 -23
- data/lib/language_server/protocol/constant/lsp_error_codes.rb +0 -55
- data/lib/language_server/protocol/constant/trace_values.rb +0 -20
- data/lib/language_server/protocol/interface/base_symbol_information.rb +0 -68
- data/lib/language_server/protocol/interface/did_change_configuration_registration_options.rb +0 -30
- data/lib/language_server/protocol/interface/document_diagnostic_report.rb +0 -77
- data/lib/language_server/protocol/interface/file_operation_client_capabilities.rb +0 -95
- data/lib/language_server/protocol/interface/file_operation_options.rb +0 -83
- data/lib/language_server/protocol/interface/general_client_capabilities.rb +0 -91
- data/lib/language_server/protocol/interface/glob_pattern.rb +0 -48
- data/lib/language_server/protocol/interface/inline_value.rb +0 -78
- data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +0 -59
- data/lib/language_server/protocol/interface/prepare_rename_result.rb +0 -60
- data/lib/language_server/protocol/interface/resource_operation.rb +0 -47
- data/lib/language_server/protocol/interface/text_document_filter.rb +0 -69
- data/lib/language_server/protocol/interface/type_hierarchy_client_capabilities.rb +0 -38
- data/lib/language_server/protocol/interface/window_client_capabilities.rb +0 -63
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +0 -176
- data/lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb +0 -77
- data/lib/language_server/protocol/interface/workspace_folders_initialize_params.rb +0 -39
@@ -4,8 +4,6 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# Additional information that describes document changes.
|
6
6
|
#
|
7
|
-
# @since 3.16.0
|
8
|
-
#
|
9
7
|
class ChangeAnnotation
|
10
8
|
def initialize(label:, needs_confirmation: nil, description: nil)
|
11
9
|
@attributes = {}
|
@@ -30,7 +28,7 @@ module LanguageServer
|
|
30
28
|
# A flag which indicates that user confirmation is needed
|
31
29
|
# before applying the change.
|
32
30
|
#
|
33
|
-
# @return [boolean
|
31
|
+
# @return [boolean]
|
34
32
|
def needs_confirmation
|
35
33
|
attributes.fetch(:needsConfirmation)
|
36
34
|
end
|
@@ -39,7 +37,7 @@ module LanguageServer
|
|
39
37
|
# A human-readable string which is rendered less prominent in
|
40
38
|
# the user interface.
|
41
39
|
#
|
42
|
-
# @return [string
|
40
|
+
# @return [string]
|
43
41
|
def description
|
44
42
|
attributes.fetch(:description)
|
45
43
|
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Defines the capabilities provided by the client.
|
6
|
-
#
|
7
4
|
class ClientCapabilities
|
8
5
|
def initialize(workspace: nil, text_document: nil, notebook_document: nil, window: nil, general: nil, experimental: nil)
|
9
6
|
@attributes = {}
|
@@ -21,7 +18,7 @@ module LanguageServer
|
|
21
18
|
#
|
22
19
|
# Workspace specific client capabilities.
|
23
20
|
#
|
24
|
-
# @return [
|
21
|
+
# @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }]
|
25
22
|
def workspace
|
26
23
|
attributes.fetch(:workspace)
|
27
24
|
end
|
@@ -29,7 +26,7 @@ module LanguageServer
|
|
29
26
|
#
|
30
27
|
# Text document specific client capabilities.
|
31
28
|
#
|
32
|
-
# @return [TextDocumentClientCapabilities
|
29
|
+
# @return [TextDocumentClientCapabilities]
|
33
30
|
def text_document
|
34
31
|
attributes.fetch(:textDocument)
|
35
32
|
end
|
@@ -37,9 +34,7 @@ module LanguageServer
|
|
37
34
|
#
|
38
35
|
# Capabilities specific to the notebook document support.
|
39
36
|
#
|
40
|
-
# @
|
41
|
-
#
|
42
|
-
# @return [NotebookDocumentClientCapabilities | nil]
|
37
|
+
# @return [NotebookDocumentClientCapabilities]
|
43
38
|
def notebook_document
|
44
39
|
attributes.fetch(:notebookDocument)
|
45
40
|
end
|
@@ -47,7 +42,7 @@ module LanguageServer
|
|
47
42
|
#
|
48
43
|
# Window specific client capabilities.
|
49
44
|
#
|
50
|
-
# @return [
|
45
|
+
# @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }]
|
51
46
|
def window
|
52
47
|
attributes.fetch(:window)
|
53
48
|
end
|
@@ -55,9 +50,7 @@ module LanguageServer
|
|
55
50
|
#
|
56
51
|
# General client capabilities.
|
57
52
|
#
|
58
|
-
# @
|
59
|
-
#
|
60
|
-
# @return [GeneralClientCapabilities | nil]
|
53
|
+
# @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }]
|
61
54
|
def general
|
62
55
|
attributes.fetch(:general)
|
63
56
|
end
|
@@ -65,7 +58,7 @@ module LanguageServer
|
|
65
58
|
#
|
66
59
|
# Experimental client capabilities.
|
67
60
|
#
|
68
|
-
# @return [LSPAny
|
61
|
+
# @return [LSPAny]
|
69
62
|
def experimental
|
70
63
|
attributes.fetch(:experimental)
|
71
64
|
end
|
@@ -2,10 +2,11 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# A code action represents a change that can be performed in code, e.g. to fix
|
6
|
-
# to refactor code.
|
5
|
+
# A code action represents a change that can be performed in code, e.g. to fix
|
6
|
+
# a problem or to refactor code.
|
7
7
|
#
|
8
|
-
# A CodeAction must set either `edit` and/or a `command`. If both are supplied,
|
8
|
+
# A CodeAction must set either `edit` and/or a `command`. If both are supplied,
|
9
|
+
# the `edit` is applied first, then the `command` is executed.
|
9
10
|
#
|
10
11
|
class CodeAction
|
11
12
|
def initialize(title:, kind: nil, diagnostics: nil, is_preferred: nil, disabled: nil, edit: nil, command: nil, data: nil)
|
@@ -36,7 +37,7 @@ module LanguageServer
|
|
36
37
|
#
|
37
38
|
# Used to filter code actions.
|
38
39
|
#
|
39
|
-
# @return [
|
40
|
+
# @return [string]
|
40
41
|
def kind
|
41
42
|
attributes.fetch(:kind)
|
42
43
|
end
|
@@ -44,21 +45,20 @@ module LanguageServer
|
|
44
45
|
#
|
45
46
|
# The diagnostics that this code action resolves.
|
46
47
|
#
|
47
|
-
# @return [Diagnostic[]
|
48
|
+
# @return [Diagnostic[]]
|
48
49
|
def diagnostics
|
49
50
|
attributes.fetch(:diagnostics)
|
50
51
|
end
|
51
52
|
|
52
53
|
#
|
53
|
-
# Marks this as a preferred action. Preferred actions are used by the
|
54
|
-
# by keybindings.
|
55
|
-
#
|
56
|
-
# A quick fix should be marked preferred if it properly addresses the underlying error.
|
57
|
-
# A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
|
54
|
+
# Marks this as a preferred action. Preferred actions are used by the
|
55
|
+
# `auto fix` command and can be targeted by keybindings.
|
58
56
|
#
|
59
|
-
#
|
57
|
+
# A quick fix should be marked preferred if it properly addresses the
|
58
|
+
# underlying error. A refactoring should be marked preferred if it is the
|
59
|
+
# most reasonable choice of actions to take.
|
60
60
|
#
|
61
|
-
# @return [boolean
|
61
|
+
# @return [boolean]
|
62
62
|
def is_preferred
|
63
63
|
attributes.fetch(:isPreferred)
|
64
64
|
end
|
@@ -66,21 +66,21 @@ module LanguageServer
|
|
66
66
|
#
|
67
67
|
# Marks that the code action cannot currently be applied.
|
68
68
|
#
|
69
|
-
# Clients should follow the following guidelines regarding disabled code
|
69
|
+
# Clients should follow the following guidelines regarding disabled code
|
70
|
+
# actions:
|
70
71
|
#
|
71
|
-
#
|
72
|
-
#
|
72
|
+
# - Disabled code actions are not shown in automatic lightbulbs code
|
73
|
+
# action menus.
|
73
74
|
#
|
74
|
-
#
|
75
|
-
#
|
75
|
+
# - Disabled actions are shown as faded out in the code action menu when
|
76
|
+
# the user request a more specific type of code action, such as
|
77
|
+
# refactorings.
|
76
78
|
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
79
|
+
# - If the user has a keybinding that auto applies a code action and only
|
80
|
+
# a disabled code actions are returned, the client should show the user
|
81
|
+
# an error message with `reason` in the editor.
|
80
82
|
#
|
81
|
-
# @
|
82
|
-
#
|
83
|
-
# @return [{ reason:string } | nil]
|
83
|
+
# @return [{ reason: string; }]
|
84
84
|
def disabled
|
85
85
|
attributes.fetch(:disabled)
|
86
86
|
end
|
@@ -88,7 +88,7 @@ module LanguageServer
|
|
88
88
|
#
|
89
89
|
# The workspace edit this code action performs.
|
90
90
|
#
|
91
|
-
# @return [WorkspaceEdit
|
91
|
+
# @return [WorkspaceEdit]
|
92
92
|
def edit
|
93
93
|
attributes.fetch(:edit)
|
94
94
|
end
|
@@ -98,7 +98,7 @@ module LanguageServer
|
|
98
98
|
# provides an edit and a command, first the edit is
|
99
99
|
# executed and then the command.
|
100
100
|
#
|
101
|
-
# @return [Command
|
101
|
+
# @return [Command]
|
102
102
|
def command
|
103
103
|
attributes.fetch(:command)
|
104
104
|
end
|
@@ -107,9 +107,7 @@ module LanguageServer
|
|
107
107
|
# A data entry field that is preserved on a code action between
|
108
108
|
# a `textDocument/codeAction` and a `codeAction/resolve` request.
|
109
109
|
#
|
110
|
-
# @
|
111
|
-
#
|
112
|
-
# @return [LSPAny | nil]
|
110
|
+
# @return [LSPAny]
|
113
111
|
def data
|
114
112
|
attributes.fetch(:data)
|
115
113
|
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# The Client Capabilities of a [CodeActionRequest](#CodeActionRequest).
|
6
|
-
#
|
7
4
|
class CodeActionClientCapabilities
|
8
5
|
def initialize(dynamic_registration: nil, code_action_literal_support: nil, is_preferred_support: nil, disabled_support: nil, data_support: nil, resolve_support: nil, honors_change_annotations: nil)
|
9
6
|
@attributes = {}
|
@@ -22,19 +19,16 @@ module LanguageServer
|
|
22
19
|
#
|
23
20
|
# Whether code action supports dynamic registration.
|
24
21
|
#
|
25
|
-
# @return [boolean
|
22
|
+
# @return [boolean]
|
26
23
|
def dynamic_registration
|
27
24
|
attributes.fetch(:dynamicRegistration)
|
28
25
|
end
|
29
26
|
|
30
27
|
#
|
31
|
-
# The client
|
32
|
-
# response of the `textDocument/codeAction` request.
|
33
|
-
# set the request can only return `Command` literals.
|
28
|
+
# The client supports code action literals as a valid
|
29
|
+
# response of the `textDocument/codeAction` request.
|
34
30
|
#
|
35
|
-
# @
|
36
|
-
#
|
37
|
-
# @return [{ codeActionKind:{ valueSet:CodeActionKind[] } } | nil]
|
31
|
+
# @return [{ codeActionKind: { valueSet: string[]; }; }]
|
38
32
|
def code_action_literal_support
|
39
33
|
attributes.fetch(:codeActionLiteralSupport)
|
40
34
|
end
|
@@ -42,9 +36,7 @@ module LanguageServer
|
|
42
36
|
#
|
43
37
|
# Whether code action supports the `isPreferred` property.
|
44
38
|
#
|
45
|
-
# @
|
46
|
-
#
|
47
|
-
# @return [boolean | nil]
|
39
|
+
# @return [boolean]
|
48
40
|
def is_preferred_support
|
49
41
|
attributes.fetch(:isPreferredSupport)
|
50
42
|
end
|
@@ -52,9 +44,7 @@ module LanguageServer
|
|
52
44
|
#
|
53
45
|
# Whether code action supports the `disabled` property.
|
54
46
|
#
|
55
|
-
# @
|
56
|
-
#
|
57
|
-
# @return [boolean | nil]
|
47
|
+
# @return [boolean]
|
58
48
|
def disabled_support
|
59
49
|
attributes.fetch(:disabledSupport)
|
60
50
|
end
|
@@ -64,9 +54,7 @@ module LanguageServer
|
|
64
54
|
# preserved between a `textDocument/codeAction` and a
|
65
55
|
# `codeAction/resolve` request.
|
66
56
|
#
|
67
|
-
# @
|
68
|
-
#
|
69
|
-
# @return [boolean | nil]
|
57
|
+
# @return [boolean]
|
70
58
|
def data_support
|
71
59
|
attributes.fetch(:dataSupport)
|
72
60
|
end
|
@@ -75,9 +63,7 @@ module LanguageServer
|
|
75
63
|
# Whether the client supports resolving additional code action
|
76
64
|
# properties via a separate `codeAction/resolve` request.
|
77
65
|
#
|
78
|
-
# @
|
79
|
-
#
|
80
|
-
# @return [{ properties:string[] } | nil]
|
66
|
+
# @return [{ properties: string[]; }]
|
81
67
|
def resolve_support
|
82
68
|
attributes.fetch(:resolveSupport)
|
83
69
|
end
|
@@ -89,9 +75,7 @@ module LanguageServer
|
|
89
75
|
# the workspace edit in the user interface and asking
|
90
76
|
# for confirmation.
|
91
77
|
#
|
92
|
-
# @
|
93
|
-
#
|
94
|
-
# @return [boolean | nil]
|
78
|
+
# @return [boolean]
|
95
79
|
def honors_change_annotations
|
96
80
|
attributes.fetch(:honorsChangeAnnotations)
|
97
81
|
end
|
@@ -3,7 +3,7 @@ module LanguageServer
|
|
3
3
|
module Interface
|
4
4
|
#
|
5
5
|
# Contains additional diagnostic information about the context in which
|
6
|
-
# a
|
6
|
+
# a code action is run.
|
7
7
|
#
|
8
8
|
class CodeActionContext
|
9
9
|
def initialize(diagnostics:, only: nil, trigger_kind: nil)
|
@@ -17,10 +17,11 @@ module LanguageServer
|
|
17
17
|
end
|
18
18
|
|
19
19
|
#
|
20
|
-
# An array of diagnostics known on the client side overlapping the range
|
21
|
-
# `textDocument/codeAction` request. They are provided so
|
22
|
-
# errors are currently presented to the user
|
23
|
-
#
|
20
|
+
# An array of diagnostics known on the client side overlapping the range
|
21
|
+
# provided to the `textDocument/codeAction` request. They are provided so
|
22
|
+
# that the server knows which errors are currently presented to the user
|
23
|
+
# for the given range. There is no guarantee that these accurately reflect
|
24
|
+
# the error state of the resource. The primary parameter
|
24
25
|
# to compute code actions is the provided range.
|
25
26
|
#
|
26
27
|
# @return [Diagnostic[]]
|
@@ -31,10 +32,10 @@ module LanguageServer
|
|
31
32
|
#
|
32
33
|
# Requested kind of actions to return.
|
33
34
|
#
|
34
|
-
# Actions not of this kind are filtered out by the client before being
|
35
|
-
# can omit computing them.
|
35
|
+
# Actions not of this kind are filtered out by the client before being
|
36
|
+
# shown. So servers can omit computing them.
|
36
37
|
#
|
37
|
-
# @return [
|
38
|
+
# @return [string[]]
|
38
39
|
def only
|
39
40
|
attributes.fetch(:only)
|
40
41
|
end
|
@@ -42,9 +43,7 @@ module LanguageServer
|
|
42
43
|
#
|
43
44
|
# The reason why code actions were requested.
|
44
45
|
#
|
45
|
-
# @
|
46
|
-
#
|
47
|
-
# @return [CodeActionTriggerKind | nil]
|
46
|
+
# @return [CodeActionTriggerKind]
|
48
47
|
def trigger_kind
|
49
48
|
attributes.fetch(:triggerKind)
|
50
49
|
end
|
@@ -1,27 +1,29 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Provider options for a [CodeActionRequest](#CodeActionRequest).
|
6
|
-
#
|
7
4
|
class CodeActionOptions
|
8
|
-
def initialize(
|
5
|
+
def initialize(work_done_progress: nil, code_action_kinds: nil, resolve_provider: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
8
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
11
9
|
@attributes[:codeActionKinds] = code_action_kinds if code_action_kinds
|
12
10
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
13
|
-
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
14
11
|
|
15
12
|
@attributes.freeze
|
16
13
|
end
|
17
14
|
|
15
|
+
# @return [boolean]
|
16
|
+
def work_done_progress
|
17
|
+
attributes.fetch(:workDoneProgress)
|
18
|
+
end
|
19
|
+
|
18
20
|
#
|
19
21
|
# CodeActionKinds that this server may return.
|
20
22
|
#
|
21
|
-
# The list of kinds may be generic, such as `CodeActionKind.Refactor`,
|
22
|
-
# may list out every specific kind they provide.
|
23
|
+
# The list of kinds may be generic, such as `CodeActionKind.Refactor`,
|
24
|
+
# or the server may list out every specific kind they provide.
|
23
25
|
#
|
24
|
-
# @return [
|
26
|
+
# @return [string[]]
|
25
27
|
def code_action_kinds
|
26
28
|
attributes.fetch(:codeActionKinds)
|
27
29
|
end
|
@@ -30,18 +32,11 @@ module LanguageServer
|
|
30
32
|
# The server provides support to resolve additional
|
31
33
|
# information for a code action.
|
32
34
|
#
|
33
|
-
# @
|
34
|
-
#
|
35
|
-
# @return [boolean | nil]
|
35
|
+
# @return [boolean]
|
36
36
|
def resolve_provider
|
37
37
|
attributes.fetch(:resolveProvider)
|
38
38
|
end
|
39
39
|
|
40
|
-
# @return [boolean | nil]
|
41
|
-
def work_done_progress
|
42
|
-
attributes.fetch(:workDoneProgress)
|
43
|
-
end
|
44
|
-
|
45
40
|
attr_reader :attributes
|
46
41
|
|
47
42
|
def to_hash
|
@@ -2,21 +2,38 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
#
|
5
|
+
# Params for the CodeActionRequest
|
6
6
|
#
|
7
7
|
class CodeActionParams
|
8
|
-
def initialize(
|
8
|
+
def initialize(work_done_token: nil, partial_result_token: nil, text_document:, range:, context:)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
12
|
+
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
11
13
|
@attributes[:textDocument] = text_document
|
12
14
|
@attributes[:range] = range
|
13
15
|
@attributes[:context] = context
|
14
|
-
@attributes[:workDoneToken] = work_done_token if work_done_token
|
15
|
-
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
16
16
|
|
17
17
|
@attributes.freeze
|
18
18
|
end
|
19
19
|
|
20
|
+
#
|
21
|
+
# An optional token that a server can use to report work done progress.
|
22
|
+
#
|
23
|
+
# @return [ProgressToken]
|
24
|
+
def work_done_token
|
25
|
+
attributes.fetch(:workDoneToken)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# An optional token that a server can use to report partial results (e.g.
|
30
|
+
# streaming) to the client.
|
31
|
+
#
|
32
|
+
# @return [ProgressToken]
|
33
|
+
def partial_result_token
|
34
|
+
attributes.fetch(:partialResultToken)
|
35
|
+
end
|
36
|
+
|
20
37
|
#
|
21
38
|
# The document in which the command was invoked.
|
22
39
|
#
|
@@ -41,23 +58,6 @@ module LanguageServer
|
|
41
58
|
attributes.fetch(:context)
|
42
59
|
end
|
43
60
|
|
44
|
-
#
|
45
|
-
# An optional token that a server can use to report work done progress.
|
46
|
-
#
|
47
|
-
# @return [ProgressToken | nil]
|
48
|
-
def work_done_token
|
49
|
-
attributes.fetch(:workDoneToken)
|
50
|
-
end
|
51
|
-
|
52
|
-
#
|
53
|
-
# An optional token that a server can use to report partial results (e.g. streaming) to
|
54
|
-
# the client.
|
55
|
-
#
|
56
|
-
# @return [ProgressToken | nil]
|
57
|
-
def partial_result_token
|
58
|
-
attributes.fetch(:partialResultToken)
|
59
|
-
end
|
60
|
-
|
61
61
|
attr_reader :attributes
|
62
62
|
|
63
63
|
def to_hash
|
@@ -1,37 +1,39 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Registration options for a [CodeActionRequest](#CodeActionRequest).
|
6
|
-
#
|
7
4
|
class CodeActionRegistrationOptions
|
8
|
-
def initialize(document_selector:,
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, code_action_kinds: nil, resolve_provider: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
8
|
@attributes[:documentSelector] = document_selector
|
9
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
12
10
|
@attributes[:codeActionKinds] = code_action_kinds if code_action_kinds
|
13
11
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
14
|
-
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
15
12
|
|
16
13
|
@attributes.freeze
|
17
14
|
end
|
18
15
|
|
19
16
|
#
|
20
|
-
# A document selector to identify the scope of the registration. If set to
|
21
|
-
# the document selector provided on the client side will be used.
|
17
|
+
# A document selector to identify the scope of the registration. If set to
|
18
|
+
# null the document selector provided on the client side will be used.
|
22
19
|
#
|
23
|
-
# @return [DocumentSelector
|
20
|
+
# @return [DocumentSelector]
|
24
21
|
def document_selector
|
25
22
|
attributes.fetch(:documentSelector)
|
26
23
|
end
|
27
24
|
|
25
|
+
# @return [boolean]
|
26
|
+
def work_done_progress
|
27
|
+
attributes.fetch(:workDoneProgress)
|
28
|
+
end
|
29
|
+
|
28
30
|
#
|
29
31
|
# CodeActionKinds that this server may return.
|
30
32
|
#
|
31
|
-
# The list of kinds may be generic, such as `CodeActionKind.Refactor`,
|
32
|
-
# may list out every specific kind they provide.
|
33
|
+
# The list of kinds may be generic, such as `CodeActionKind.Refactor`,
|
34
|
+
# or the server may list out every specific kind they provide.
|
33
35
|
#
|
34
|
-
# @return [
|
36
|
+
# @return [string[]]
|
35
37
|
def code_action_kinds
|
36
38
|
attributes.fetch(:codeActionKinds)
|
37
39
|
end
|
@@ -40,18 +42,11 @@ module LanguageServer
|
|
40
42
|
# The server provides support to resolve additional
|
41
43
|
# information for a code action.
|
42
44
|
#
|
43
|
-
# @
|
44
|
-
#
|
45
|
-
# @return [boolean | nil]
|
45
|
+
# @return [boolean]
|
46
46
|
def resolve_provider
|
47
47
|
attributes.fetch(:resolveProvider)
|
48
48
|
end
|
49
49
|
|
50
|
-
# @return [boolean | nil]
|
51
|
-
def work_done_progress
|
52
|
-
attributes.fetch(:workDoneProgress)
|
53
|
-
end
|
54
|
-
|
55
50
|
attr_reader :attributes
|
56
51
|
|
57
52
|
def to_hash
|
@@ -4,8 +4,6 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# Structure to capture a description for an error code.
|
6
6
|
#
|
7
|
-
# @since 3.16.0
|
8
|
-
#
|
9
7
|
class CodeDescription
|
10
8
|
def initialize(href:)
|
11
9
|
@attributes = {}
|
@@ -18,7 +16,7 @@ module LanguageServer
|
|
18
16
|
#
|
19
17
|
# An URI to open with more information about the diagnostic error.
|
20
18
|
#
|
21
|
-
# @return [
|
19
|
+
# @return [string]
|
22
20
|
def href
|
23
21
|
attributes.fetch(:href)
|
24
22
|
end
|
@@ -2,11 +2,12 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# A code lens represents a
|
5
|
+
# A code lens represents a command that should be shown along with
|
6
6
|
# source text, like the number of references, a way to run tests, etc.
|
7
7
|
#
|
8
|
-
# A code lens is _unresolved_ when no command is associated to it. For
|
9
|
-
# reasons the creation of a code lens and resolving should be done
|
8
|
+
# A code lens is _unresolved_ when no command is associated to it. For
|
9
|
+
# performance reasons the creation of a code lens and resolving should be done
|
10
|
+
# in two stages.
|
10
11
|
#
|
11
12
|
class CodeLens
|
12
13
|
def initialize(range:, command: nil, data: nil)
|
@@ -20,7 +21,8 @@ module LanguageServer
|
|
20
21
|
end
|
21
22
|
|
22
23
|
#
|
23
|
-
# The range in which this code lens is valid. Should only span a single
|
24
|
+
# The range in which this code lens is valid. Should only span a single
|
25
|
+
# line.
|
24
26
|
#
|
25
27
|
# @return [Range]
|
26
28
|
def range
|
@@ -30,17 +32,16 @@ module LanguageServer
|
|
30
32
|
#
|
31
33
|
# The command this code lens represents.
|
32
34
|
#
|
33
|
-
# @return [Command
|
35
|
+
# @return [Command]
|
34
36
|
def command
|
35
37
|
attributes.fetch(:command)
|
36
38
|
end
|
37
39
|
|
38
40
|
#
|
39
41
|
# A data entry field that is preserved on a code lens item between
|
40
|
-
# a
|
41
|
-
# (#CodeLensResolveRequest)
|
42
|
+
# a code lens and a code lens resolve request.
|
42
43
|
#
|
43
|
-
# @return [LSPAny
|
44
|
+
# @return [LSPAny]
|
44
45
|
def data
|
45
46
|
attributes.fetch(:data)
|
46
47
|
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# The client capabilities of a [CodeLensRequest](#CodeLensRequest).
|
6
|
-
#
|
7
4
|
class CodeLensClientCapabilities
|
8
5
|
def initialize(dynamic_registration: nil)
|
9
6
|
@attributes = {}
|
@@ -16,7 +13,7 @@ module LanguageServer
|
|
16
13
|
#
|
17
14
|
# Whether code lens supports dynamic registration.
|
18
15
|
#
|
19
|
-
# @return [boolean
|
16
|
+
# @return [boolean]
|
20
17
|
def dynamic_registration
|
21
18
|
attributes.fetch(:dynamicRegistration)
|
22
19
|
end
|
@@ -1,32 +1,29 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Code Lens provider options of a [CodeLensRequest](#CodeLensRequest).
|
6
|
-
#
|
7
4
|
class CodeLensOptions
|
8
|
-
def initialize(
|
5
|
+
def initialize(work_done_progress: nil, resolve_provider: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
|
-
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
12
8
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
13
10
|
|
14
11
|
@attributes.freeze
|
15
12
|
end
|
16
13
|
|
14
|
+
# @return [boolean]
|
15
|
+
def work_done_progress
|
16
|
+
attributes.fetch(:workDoneProgress)
|
17
|
+
end
|
18
|
+
|
17
19
|
#
|
18
20
|
# Code lens has a resolve provider as well.
|
19
21
|
#
|
20
|
-
# @return [boolean
|
22
|
+
# @return [boolean]
|
21
23
|
def resolve_provider
|
22
24
|
attributes.fetch(:resolveProvider)
|
23
25
|
end
|
24
26
|
|
25
|
-
# @return [boolean | nil]
|
26
|
-
def work_done_progress
|
27
|
-
attributes.fetch(:workDoneProgress)
|
28
|
-
end
|
29
|
-
|
30
27
|
attr_reader :attributes
|
31
28
|
|
32
29
|
def to_hash
|