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,40 +4,24 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# An unchanged diagnostic report with a set of related documents.
|
6
6
|
#
|
7
|
-
# @since 3.17.0
|
8
|
-
#
|
9
7
|
class RelatedUnchangedDocumentDiagnosticReport
|
10
|
-
def initialize(
|
8
|
+
def initialize(kind:, result_id:, related_documents: nil)
|
11
9
|
@attributes = {}
|
12
10
|
|
13
|
-
@attributes[:relatedDocuments] = related_documents if related_documents
|
14
11
|
@attributes[:kind] = kind
|
15
12
|
@attributes[:resultId] = result_id
|
13
|
+
@attributes[:relatedDocuments] = related_documents if related_documents
|
16
14
|
|
17
15
|
@attributes.freeze
|
18
16
|
end
|
19
17
|
|
20
|
-
#
|
21
|
-
# Diagnostics of related documents. This information is useful
|
22
|
-
# in programming languages where code in a file A can generate
|
23
|
-
# diagnostics in a file B which A depends on. An example of
|
24
|
-
# such a language is C/C++ where marco definitions in a file
|
25
|
-
# a.cpp and result in errors in a header file b.hpp.
|
26
|
-
#
|
27
|
-
# @since 3.17.0
|
28
|
-
#
|
29
|
-
# @return [DocumentUri => FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport | nil]
|
30
|
-
def related_documents
|
31
|
-
attributes.fetch(:relatedDocuments)
|
32
|
-
end
|
33
|
-
|
34
18
|
#
|
35
19
|
# A document diagnostic report indicating
|
36
20
|
# no changes to the last result. A server can
|
37
21
|
# only return `unchanged` if result ids are
|
38
22
|
# provided.
|
39
23
|
#
|
40
|
-
# @return [
|
24
|
+
# @return [any]
|
41
25
|
def kind
|
42
26
|
attributes.fetch(:kind)
|
43
27
|
end
|
@@ -51,6 +35,18 @@ module LanguageServer
|
|
51
35
|
attributes.fetch(:resultId)
|
52
36
|
end
|
53
37
|
|
38
|
+
#
|
39
|
+
# Diagnostics of related documents. This information is useful
|
40
|
+
# in programming languages where code in a file A can generate
|
41
|
+
# diagnostics in a file B which A depends on. An example of
|
42
|
+
# such a language is C/C++ where marco definitions in a file
|
43
|
+
# a.cpp and result in errors in a header file b.hpp.
|
44
|
+
#
|
45
|
+
# @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }]
|
46
|
+
def related_documents
|
47
|
+
attributes.fetch(:relatedDocuments)
|
48
|
+
end
|
49
|
+
|
54
50
|
attr_reader :attributes
|
55
51
|
|
56
52
|
def to_hash
|
@@ -6,8 +6,6 @@ module LanguageServer
|
|
6
6
|
# relatively to a base URI. The common value for a `baseUri` is a workspace
|
7
7
|
# folder root, but it can be another absolute URI as well.
|
8
8
|
#
|
9
|
-
# @since 3.17.0
|
10
|
-
#
|
11
9
|
class RelativePattern
|
12
10
|
def initialize(base_uri:, pattern:)
|
13
11
|
@attributes = {}
|
@@ -22,7 +20,7 @@ module LanguageServer
|
|
22
20
|
# A workspace folder or a base URI to which this pattern will be matched
|
23
21
|
# against relatively.
|
24
22
|
#
|
25
|
-
# @return [
|
23
|
+
# @return [string | WorkspaceFolder]
|
26
24
|
def base_uri
|
27
25
|
attributes.fetch(:baseUri)
|
28
26
|
end
|
@@ -30,7 +28,7 @@ module LanguageServer
|
|
30
28
|
#
|
31
29
|
# The actual glob pattern;
|
32
30
|
#
|
33
|
-
# @return [
|
31
|
+
# @return [string]
|
34
32
|
def pattern
|
35
33
|
attributes.fetch(:pattern)
|
36
34
|
end
|
@@ -16,7 +16,7 @@ module LanguageServer
|
|
16
16
|
#
|
17
17
|
# Whether rename supports dynamic registration.
|
18
18
|
#
|
19
|
-
# @return [boolean
|
19
|
+
# @return [boolean]
|
20
20
|
def dynamic_registration
|
21
21
|
attributes.fetch(:dynamicRegistration)
|
22
22
|
end
|
@@ -25,36 +25,31 @@ module LanguageServer
|
|
25
25
|
# Client supports testing for validity of rename operations
|
26
26
|
# before execution.
|
27
27
|
#
|
28
|
-
# @
|
29
|
-
#
|
30
|
-
# @return [boolean | nil]
|
28
|
+
# @return [boolean]
|
31
29
|
def prepare_support
|
32
30
|
attributes.fetch(:prepareSupport)
|
33
31
|
end
|
34
32
|
|
35
33
|
#
|
36
|
-
# Client supports the default behavior result
|
34
|
+
# Client supports the default behavior result
|
35
|
+
# (`{ defaultBehavior: boolean }`).
|
37
36
|
#
|
38
37
|
# The value indicates the default behavior used by the
|
39
38
|
# client.
|
40
39
|
#
|
41
|
-
# @
|
42
|
-
#
|
43
|
-
# @return [PrepareSupportDefaultBehavior | nil]
|
40
|
+
# @return [1]
|
44
41
|
def prepare_support_default_behavior
|
45
42
|
attributes.fetch(:prepareSupportDefaultBehavior)
|
46
43
|
end
|
47
44
|
|
48
45
|
#
|
49
|
-
# Whether
|
46
|
+
# Whether th client honors the change annotations in
|
50
47
|
# text edits and resource operations returned via the
|
51
48
|
# rename request's workspace edit by for example presenting
|
52
49
|
# the workspace edit in the user interface and asking
|
53
50
|
# for confirmation.
|
54
51
|
#
|
55
|
-
# @
|
56
|
-
#
|
57
|
-
# @return [boolean | nil]
|
52
|
+
# @return [boolean]
|
58
53
|
def honors_change_annotations
|
59
54
|
attributes.fetch(:honorsChangeAnnotations)
|
60
55
|
end
|
@@ -28,7 +28,7 @@ module LanguageServer
|
|
28
28
|
#
|
29
29
|
# The old (existing) location.
|
30
30
|
#
|
31
|
-
# @return [
|
31
|
+
# @return [string]
|
32
32
|
def old_uri
|
33
33
|
attributes.fetch(:oldUri)
|
34
34
|
end
|
@@ -36,7 +36,7 @@ module LanguageServer
|
|
36
36
|
#
|
37
37
|
# The new location.
|
38
38
|
#
|
39
|
-
# @return [
|
39
|
+
# @return [string]
|
40
40
|
def new_uri
|
41
41
|
attributes.fetch(:newUri)
|
42
42
|
end
|
@@ -44,7 +44,7 @@ module LanguageServer
|
|
44
44
|
#
|
45
45
|
# Rename options.
|
46
46
|
#
|
47
|
-
# @return [RenameFileOptions
|
47
|
+
# @return [RenameFileOptions]
|
48
48
|
def options
|
49
49
|
attributes.fetch(:options)
|
50
50
|
end
|
@@ -52,9 +52,7 @@ module LanguageServer
|
|
52
52
|
#
|
53
53
|
# An optional annotation identifier describing the operation.
|
54
54
|
#
|
55
|
-
# @
|
56
|
-
#
|
57
|
-
# @return [ChangeAnnotationIdentifier | nil]
|
55
|
+
# @return [string]
|
58
56
|
def annotation_id
|
59
57
|
attributes.fetch(:annotationId)
|
60
58
|
end
|
@@ -17,7 +17,7 @@ module LanguageServer
|
|
17
17
|
#
|
18
18
|
# Overwrite target if existing. Overwrite wins over `ignoreIfExists`
|
19
19
|
#
|
20
|
-
# @return [boolean
|
20
|
+
# @return [boolean]
|
21
21
|
def overwrite
|
22
22
|
attributes.fetch(:overwrite)
|
23
23
|
end
|
@@ -25,7 +25,7 @@ module LanguageServer
|
|
25
25
|
#
|
26
26
|
# Ignores if target exists.
|
27
27
|
#
|
28
|
-
# @return [boolean
|
28
|
+
# @return [boolean]
|
29
29
|
def ignore_if_exists
|
30
30
|
attributes.fetch(:ignoreIfExists)
|
31
31
|
end
|
@@ -2,10 +2,8 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# The parameters sent in notifications/requests for user-initiated renames
|
6
|
-
# files.
|
7
|
-
#
|
8
|
-
# @since 3.16.0
|
5
|
+
# The parameters sent in notifications/requests for user-initiated renames
|
6
|
+
# of files.
|
9
7
|
#
|
10
8
|
class RenameFilesParams
|
11
9
|
def initialize(files:)
|
@@ -17,8 +15,8 @@ module LanguageServer
|
|
17
15
|
end
|
18
16
|
|
19
17
|
#
|
20
|
-
# An array of all files/folders renamed in this operation. When a folder
|
21
|
-
# the folder will be included, and not its children.
|
18
|
+
# An array of all files/folders renamed in this operation. When a folder
|
19
|
+
# is renamed, only the folder will be included, and not its children.
|
22
20
|
#
|
23
21
|
# @return [FileRename[]]
|
24
22
|
def files
|
@@ -1,34 +1,29 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Provider options for a [RenameRequest](#RenameRequest).
|
6
|
-
#
|
7
4
|
class RenameOptions
|
8
|
-
def initialize(
|
5
|
+
def initialize(work_done_progress: nil, prepare_provider: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
|
-
@attributes[:prepareProvider] = prepare_provider if prepare_provider
|
12
8
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
9
|
+
@attributes[:prepareProvider] = prepare_provider if prepare_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
|
# Renames should be checked and tested before being executed.
|
19
21
|
#
|
20
|
-
# @
|
21
|
-
#
|
22
|
-
# @return [boolean | nil]
|
22
|
+
# @return [boolean]
|
23
23
|
def prepare_provider
|
24
24
|
attributes.fetch(:prepareProvider)
|
25
25
|
end
|
26
26
|
|
27
|
-
# @return [boolean | nil]
|
28
|
-
def work_done_progress
|
29
|
-
attributes.fetch(:workDoneProgress)
|
30
|
-
end
|
31
|
-
|
32
27
|
attr_reader :attributes
|
33
28
|
|
34
29
|
def to_hash
|
@@ -1,23 +1,20 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# The parameters of a [RenameRequest](#RenameRequest).
|
6
|
-
#
|
7
4
|
class RenameParams
|
8
|
-
def initialize(text_document:, position:,
|
5
|
+
def initialize(text_document:, position:, work_done_token: nil, new_name:)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
8
|
@attributes[:textDocument] = text_document
|
12
9
|
@attributes[:position] = position
|
13
|
-
@attributes[:newName] = new_name
|
14
10
|
@attributes[:workDoneToken] = work_done_token if work_done_token
|
11
|
+
@attributes[:newName] = new_name
|
15
12
|
|
16
13
|
@attributes.freeze
|
17
14
|
end
|
18
15
|
|
19
16
|
#
|
20
|
-
# The document
|
17
|
+
# The text document.
|
21
18
|
#
|
22
19
|
# @return [TextDocumentIdentifier]
|
23
20
|
def text_document
|
@@ -25,13 +22,21 @@ module LanguageServer
|
|
25
22
|
end
|
26
23
|
|
27
24
|
#
|
28
|
-
# The position
|
25
|
+
# The position inside the text document.
|
29
26
|
#
|
30
27
|
# @return [Position]
|
31
28
|
def position
|
32
29
|
attributes.fetch(:position)
|
33
30
|
end
|
34
31
|
|
32
|
+
#
|
33
|
+
# An optional token that a server can use to report work done progress.
|
34
|
+
#
|
35
|
+
# @return [ProgressToken]
|
36
|
+
def work_done_token
|
37
|
+
attributes.fetch(:workDoneToken)
|
38
|
+
end
|
39
|
+
|
35
40
|
#
|
36
41
|
# The new name of the symbol. If the given name is not valid the
|
37
42
|
# request must return a [ResponseError](#ResponseError) with an
|
@@ -42,14 +47,6 @@ module LanguageServer
|
|
42
47
|
attributes.fetch(:newName)
|
43
48
|
end
|
44
49
|
|
45
|
-
#
|
46
|
-
# An optional token that a server can use to report work done progress.
|
47
|
-
#
|
48
|
-
# @return [ProgressToken | nil]
|
49
|
-
def work_done_token
|
50
|
-
attributes.fetch(:workDoneToken)
|
51
|
-
end
|
52
|
-
|
53
50
|
attr_reader :attributes
|
54
51
|
|
55
52
|
def to_hash
|
@@ -1,44 +1,39 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Registration options for a [RenameRequest](#RenameRequest).
|
6
|
-
#
|
7
4
|
class RenameRegistrationOptions
|
8
|
-
def initialize(document_selector:,
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, prepare_provider: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
8
|
@attributes[:documentSelector] = document_selector
|
12
|
-
@attributes[:prepareProvider] = prepare_provider if prepare_provider
|
13
9
|
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
10
|
+
@attributes[:prepareProvider] = prepare_provider if prepare_provider
|
14
11
|
|
15
12
|
@attributes.freeze
|
16
13
|
end
|
17
14
|
|
18
15
|
#
|
19
|
-
# A document selector to identify the scope of the registration. If set to
|
20
|
-
# the document selector provided on the client side will be used.
|
16
|
+
# A document selector to identify the scope of the registration. If set to
|
17
|
+
# null the document selector provided on the client side will be used.
|
21
18
|
#
|
22
|
-
# @return [DocumentSelector
|
19
|
+
# @return [DocumentSelector]
|
23
20
|
def document_selector
|
24
21
|
attributes.fetch(:documentSelector)
|
25
22
|
end
|
26
23
|
|
24
|
+
# @return [boolean]
|
25
|
+
def work_done_progress
|
26
|
+
attributes.fetch(:workDoneProgress)
|
27
|
+
end
|
28
|
+
|
27
29
|
#
|
28
30
|
# Renames should be checked and tested before being executed.
|
29
31
|
#
|
30
|
-
# @
|
31
|
-
#
|
32
|
-
# @return [boolean | nil]
|
32
|
+
# @return [boolean]
|
33
33
|
def prepare_provider
|
34
34
|
attributes.fetch(:prepareProvider)
|
35
35
|
end
|
36
36
|
|
37
|
-
# @return [boolean | nil]
|
38
|
-
def work_done_progress
|
39
|
-
attributes.fetch(:workDoneProgress)
|
40
|
-
end
|
41
|
-
|
42
37
|
attr_reader :attributes
|
43
38
|
|
44
39
|
def to_hash
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class RequestMessage
|
5
|
+
def initialize(jsonrpc:, id:, method:, params: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:jsonrpc] = jsonrpc
|
9
|
+
@attributes[:id] = id
|
10
|
+
@attributes[:method] = method
|
11
|
+
@attributes[:params] = params if params
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [string]
|
17
|
+
def jsonrpc
|
18
|
+
attributes.fetch(:jsonrpc)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# The request id.
|
23
|
+
#
|
24
|
+
# @return [string | number]
|
25
|
+
def id
|
26
|
+
attributes.fetch(:id)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# The method to be invoked.
|
31
|
+
#
|
32
|
+
# @return [string]
|
33
|
+
def method
|
34
|
+
attributes.fetch(:method)
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# The method's params.
|
39
|
+
#
|
40
|
+
# @return [any]
|
41
|
+
def params
|
42
|
+
attributes.fetch(:params)
|
43
|
+
end
|
44
|
+
|
45
|
+
attr_reader :attributes
|
46
|
+
|
47
|
+
def to_hash
|
48
|
+
attributes
|
49
|
+
end
|
50
|
+
|
51
|
+
def to_json(*args)
|
52
|
+
to_hash.to_json(*args)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class ResponseError
|
5
|
+
def initialize(code:, message:, data: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:code] = code
|
9
|
+
@attributes[:message] = message
|
10
|
+
@attributes[:data] = data if data
|
11
|
+
|
12
|
+
@attributes.freeze
|
13
|
+
end
|
14
|
+
|
15
|
+
#
|
16
|
+
# A number indicating the error type that occurred.
|
17
|
+
#
|
18
|
+
# @return [number]
|
19
|
+
def code
|
20
|
+
attributes.fetch(:code)
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# A string providing a short description of the error.
|
25
|
+
#
|
26
|
+
# @return [string]
|
27
|
+
def message
|
28
|
+
attributes.fetch(:message)
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# A primitive or structured value that contains additional
|
33
|
+
# information about the error. Can be omitted.
|
34
|
+
#
|
35
|
+
# @return [any]
|
36
|
+
def data
|
37
|
+
attributes.fetch(:data)
|
38
|
+
end
|
39
|
+
|
40
|
+
attr_reader :attributes
|
41
|
+
|
42
|
+
def to_hash
|
43
|
+
attributes
|
44
|
+
end
|
45
|
+
|
46
|
+
def to_json(*args)
|
47
|
+
to_hash.to_json(*args)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
class ResponseMessage
|
5
|
+
def initialize(jsonrpc:, id:, result: nil, error: nil)
|
6
|
+
@attributes = {}
|
7
|
+
|
8
|
+
@attributes[:jsonrpc] = jsonrpc
|
9
|
+
@attributes[:id] = id
|
10
|
+
@attributes[:result] = result if result
|
11
|
+
@attributes[:error] = error if error
|
12
|
+
|
13
|
+
@attributes.freeze
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [string]
|
17
|
+
def jsonrpc
|
18
|
+
attributes.fetch(:jsonrpc)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# The request id.
|
23
|
+
#
|
24
|
+
# @return [string | number]
|
25
|
+
def id
|
26
|
+
attributes.fetch(:id)
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# The result of a request. This member is REQUIRED on success.
|
31
|
+
# This member MUST NOT exist if there was an error invoking the method.
|
32
|
+
#
|
33
|
+
# @return [string | number | boolean | object]
|
34
|
+
def result
|
35
|
+
attributes.fetch(:result)
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# The error object in case a request fails.
|
40
|
+
#
|
41
|
+
# @return [ResponseError]
|
42
|
+
def error
|
43
|
+
attributes.fetch(:error)
|
44
|
+
end
|
45
|
+
|
46
|
+
attr_reader :attributes
|
47
|
+
|
48
|
+
def to_hash
|
49
|
+
attributes
|
50
|
+
end
|
51
|
+
|
52
|
+
def to_json(*args)
|
53
|
+
to_hash.to_json(*args)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -1,9 +1,6 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Save options.
|
6
|
-
#
|
7
4
|
class SaveOptions
|
8
5
|
def initialize(include_text: nil)
|
9
6
|
@attributes = {}
|
@@ -16,7 +13,7 @@ module LanguageServer
|
|
16
13
|
#
|
17
14
|
# The client is supposed to include the content on save.
|
18
15
|
#
|
19
|
-
# @return [boolean
|
16
|
+
# @return [boolean]
|
20
17
|
def include_text
|
21
18
|
attributes.fetch(:includeText)
|
22
19
|
end
|
@@ -1,10 +1,6 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# A selection range represents a part of a selection hierarchy. A selection range
|
6
|
-
# may have a parent selection range that contains it.
|
7
|
-
#
|
8
4
|
class SelectionRange
|
9
5
|
def initialize(range:, parent: nil)
|
10
6
|
@attributes = {}
|
@@ -24,9 +20,10 @@ module LanguageServer
|
|
24
20
|
end
|
25
21
|
|
26
22
|
#
|
27
|
-
# The parent selection range containing this range. Therefore
|
23
|
+
# The parent selection range containing this range. Therefore
|
24
|
+
# `parent.range` must contain `this.range`.
|
28
25
|
#
|
29
|
-
# @return [SelectionRange
|
26
|
+
# @return [SelectionRange]
|
30
27
|
def parent
|
31
28
|
attributes.fetch(:parent)
|
32
29
|
end
|
@@ -11,11 +11,12 @@ module LanguageServer
|
|
11
11
|
end
|
12
12
|
|
13
13
|
#
|
14
|
-
# Whether implementation supports dynamic registration for selection range
|
15
|
-
#
|
16
|
-
#
|
14
|
+
# Whether implementation supports dynamic registration for selection range
|
15
|
+
# providers. If this is set to `true` the client supports the new
|
16
|
+
# `SelectionRangeRegistrationOptions` return value for the corresponding
|
17
|
+
# server capability as well.
|
17
18
|
#
|
18
|
-
# @return [boolean
|
19
|
+
# @return [boolean]
|
19
20
|
def dynamic_registration
|
20
21
|
attributes.fetch(:dynamicRegistration)
|
21
22
|
end
|