language_server-protocol 3.16.0.1 → 3.17.0.0
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 +25 -24
- data/lib/language_server/protocol/constant/code_action_trigger_kind.rb +24 -0
- data/lib/language_server/protocol/constant/completion_item_tag.rb +4 -2
- data/lib/language_server/protocol/constant/completion_trigger_kind.rb +2 -3
- data/lib/language_server/protocol/constant/diagnostic_severity.rb +3 -0
- data/lib/language_server/protocol/constant/diagnostic_tag.rb +4 -2
- data/lib/language_server/protocol/constant/error_codes.rb +19 -14
- data/lib/language_server/protocol/constant/failure_handling_kind.rb +9 -10
- data/lib/language_server/protocol/constant/file_change_type.rb +1 -1
- data/lib/language_server/protocol/constant/file_operation_pattern_kind.rb +4 -2
- data/lib/language_server/protocol/constant/folding_range_kind.rb +23 -0
- data/lib/language_server/protocol/constant/inlay_hint_kind.rb +21 -0
- data/lib/language_server/protocol/constant/insert_text_format.rb +2 -0
- data/lib/language_server/protocol/constant/insert_text_mode.rb +2 -0
- data/lib/language_server/protocol/constant/lsp_error_codes.rb +55 -0
- data/lib/language_server/protocol/constant/markup_kind.rb +2 -2
- data/lib/language_server/protocol/constant/message_type.rb +3 -0
- data/lib/language_server/protocol/constant/moniker_kind.rb +26 -0
- data/lib/language_server/protocol/constant/notebook_cell_kind.rb +21 -0
- data/lib/language_server/protocol/constant/position_encoding_kind.rb +32 -0
- data/lib/language_server/protocol/constant/resource_operation_kind.rb +3 -6
- data/lib/language_server/protocol/constant/semantic_token_modifiers.rb +25 -0
- data/lib/language_server/protocol/constant/semantic_token_types.rb +45 -0
- data/lib/language_server/protocol/constant/signature_help_trigger_kind.rb +3 -2
- data/lib/language_server/protocol/constant/symbol_tag.rb +2 -0
- data/lib/language_server/protocol/constant/text_document_save_reason.rb +2 -2
- data/lib/language_server/protocol/constant/text_document_sync_kind.rb +3 -3
- data/lib/language_server/protocol/constant/token_format.rb +1 -1
- data/lib/language_server/protocol/constant/trace_values.rb +20 -0
- data/lib/language_server/protocol/constant/uniqueness_level.rb +33 -0
- data/lib/language_server/protocol/constant.rb +22 -4
- data/lib/language_server/protocol/interface/annotated_text_edit.rb +12 -10
- data/lib/language_server/protocol/interface/apply_workspace_edit_params.rb +4 -1
- data/lib/language_server/protocol/interface/{apply_workspace_edit_response.rb → apply_workspace_edit_result.rb} +11 -7
- data/lib/language_server/protocol/interface/base_symbol_information.rb +68 -0
- data/lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb +7 -5
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb +5 -0
- data/lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb +16 -11
- data/lib/language_server/protocol/interface/call_hierarchy_item.rb +14 -10
- data/lib/language_server/protocol/interface/call_hierarchy_options.rb +6 -1
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb +8 -2
- data/lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb +16 -11
- data/lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb +6 -1
- data/lib/language_server/protocol/interface/call_hierarchy_registration_options.rb +10 -5
- data/lib/language_server/protocol/interface/cancel_params.rb +1 -1
- data/lib/language_server/protocol/interface/change_annotation.rb +4 -2
- data/lib/language_server/protocol/interface/client_capabilities.rb +22 -6
- data/lib/language_server/protocol/interface/code_action.rb +28 -26
- data/lib/language_server/protocol/interface/code_action_client_capabilities.rb +25 -9
- data/lib/language_server/protocol/interface/code_action_context.rb +20 -10
- data/lib/language_server/protocol/interface/code_action_options.rb +16 -11
- data/lib/language_server/protocol/interface/code_action_params.rb +21 -21
- data/lib/language_server/protocol/interface/code_action_registration_options.rb +19 -14
- data/lib/language_server/protocol/interface/code_description.rb +3 -1
- data/lib/language_server/protocol/interface/code_lens.rb +8 -9
- data/lib/language_server/protocol/interface/code_lens_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/code_lens_options.rb +11 -8
- data/lib/language_server/protocol/interface/code_lens_params.rb +17 -14
- data/lib/language_server/protocol/interface/code_lens_registration_options.rb +14 -11
- data/lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/color.rb +4 -4
- data/lib/language_server/protocol/interface/color_information.rb +3 -0
- data/lib/language_server/protocol/interface/color_presentation.rb +8 -9
- data/lib/language_server/protocol/interface/color_presentation_params.rb +24 -21
- data/lib/language_server/protocol/interface/command.rb +7 -1
- data/lib/language_server/protocol/interface/completion_client_capabilities.rb +33 -5
- data/lib/language_server/protocol/interface/completion_context.rb +4 -6
- data/lib/language_server/protocol/interface/completion_item.rb +92 -49
- data/lib/language_server/protocol/interface/completion_item_label_details.rb +49 -0
- data/lib/language_server/protocol/interface/completion_list.rb +28 -5
- data/lib/language_server/protocol/interface/completion_options.rb +36 -25
- data/lib/language_server/protocol/interface/completion_params.rb +18 -16
- data/lib/language_server/protocol/interface/completion_registration_options.rb +42 -28
- data/lib/language_server/protocol/interface/configuration_item.rb +2 -2
- data/lib/language_server/protocol/interface/configuration_params.rb +3 -0
- data/lib/language_server/protocol/interface/create_file.rb +7 -5
- data/lib/language_server/protocol/interface/create_file_options.rb +2 -2
- data/lib/language_server/protocol/interface/create_files_params.rb +4 -2
- data/lib/language_server/protocol/interface/declaration_client_capabilities.rb +8 -5
- 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 +7 -2
- data/lib/language_server/protocol/interface/definition_options.rb +4 -1
- data/lib/language_server/protocol/interface/definition_params.rb +7 -4
- data/lib/language_server/protocol/interface/definition_registration_options.rb +7 -4
- data/lib/language_server/protocol/interface/delete_file.rb +6 -4
- data/lib/language_server/protocol/interface/delete_file_options.rb +2 -2
- data/lib/language_server/protocol/interface/delete_files_params.rb +4 -2
- data/lib/language_server/protocol/interface/diagnostic.rb +25 -14
- data/lib/language_server/protocol/interface/diagnostic_client_capabilities.rb +49 -0
- data/lib/language_server/protocol/interface/diagnostic_options.rb +66 -0
- data/lib/language_server/protocol/interface/diagnostic_registration_options.rb +86 -0
- data/lib/language_server/protocol/interface/diagnostic_related_information.rb +3 -3
- data/lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb +35 -0
- data/lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb +44 -0
- 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 +4 -1
- data/lib/language_server/protocol/interface/did_change_configuration_registration_options.rb +30 -0
- data/lib/language_server/protocol/interface/did_change_notebook_document_params.rb +62 -0
- data/lib/language_server/protocol/interface/did_change_text_document_params.rb +12 -11
- data/lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb +17 -5
- data/lib/language_server/protocol/interface/did_change_watched_files_params.rb +3 -0
- 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 +3 -0
- data/lib/language_server/protocol/interface/did_close_notebook_document_params.rb +48 -0
- data/lib/language_server/protocol/interface/did_close_text_document_params.rb +3 -0
- data/lib/language_server/protocol/interface/did_open_notebook_document_params.rb +48 -0
- data/lib/language_server/protocol/interface/did_open_text_document_params.rb +3 -0
- data/lib/language_server/protocol/interface/did_save_notebook_document_params.rb +38 -0
- data/lib/language_server/protocol/interface/did_save_text_document_params.rb +4 -1
- data/lib/language_server/protocol/interface/document_color_client_capabilities.rb +4 -2
- data/lib/language_server/protocol/interface/document_color_options.rb +1 -1
- data/lib/language_server/protocol/interface/document_color_params.rb +17 -14
- data/lib/language_server/protocol/interface/document_color_registration_options.rb +11 -11
- data/lib/language_server/protocol/interface/document_diagnostic_params.rb +75 -0
- data/lib/language_server/protocol/interface/document_diagnostic_report.rb +77 -0
- data/lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb +35 -0
- data/lib/language_server/protocol/interface/document_filter.rb +25 -19
- data/lib/language_server/protocol/interface/document_formatting_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/document_formatting_options.rb +4 -1
- data/lib/language_server/protocol/interface/document_formatting_params.rb +13 -10
- data/lib/language_server/protocol/interface/document_formatting_registration_options.rb +7 -4
- data/lib/language_server/protocol/interface/document_highlight.rb +2 -2
- data/lib/language_server/protocol/interface/document_highlight_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/document_highlight_options.rb +4 -1
- data/lib/language_server/protocol/interface/document_highlight_params.rb +7 -4
- data/lib/language_server/protocol/interface/document_highlight_registration_options.rb +7 -4
- data/lib/language_server/protocol/interface/document_link.rb +10 -9
- data/lib/language_server/protocol/interface/document_link_client_capabilities.rb +7 -2
- data/lib/language_server/protocol/interface/document_link_options.rb +11 -8
- data/lib/language_server/protocol/interface/document_link_params.rb +17 -14
- data/lib/language_server/protocol/interface/document_link_registration_options.rb +14 -11
- data/lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/document_on_type_formatting_options.rb +5 -2
- data/lib/language_server/protocol/interface/document_on_type_formatting_params.rb +12 -4
- data/lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb +8 -5
- data/lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb +5 -2
- data/lib/language_server/protocol/interface/document_range_formatting_options.rb +4 -1
- data/lib/language_server/protocol/interface/document_range_formatting_params.rb +13 -10
- data/lib/language_server/protocol/interface/document_range_formatting_registration_options.rb +7 -4
- data/lib/language_server/protocol/interface/document_symbol.rb +18 -16
- data/lib/language_server/protocol/interface/document_symbol_client_capabilities.rb +12 -5
- data/lib/language_server/protocol/interface/document_symbol_options.rb +13 -8
- data/lib/language_server/protocol/interface/document_symbol_params.rb +17 -14
- data/lib/language_server/protocol/interface/document_symbol_registration_options.rb +16 -11
- data/lib/language_server/protocol/interface/execute_command_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/execute_command_options.rb +10 -7
- data/lib/language_server/protocol/interface/execute_command_params.rb +14 -11
- data/lib/language_server/protocol/interface/execute_command_registration_options.rb +8 -8
- data/lib/language_server/protocol/interface/execution_summary.rb +45 -0
- data/lib/language_server/protocol/interface/file_create.rb +2 -0
- data/lib/language_server/protocol/interface/file_delete.rb +2 -0
- data/lib/language_server/protocol/interface/file_event.rb +3 -3
- data/lib/language_server/protocol/interface/file_operation_client_capabilities.rb +95 -0
- data/lib/language_server/protocol/interface/file_operation_filter.rb +5 -3
- data/lib/language_server/protocol/interface/file_operation_options.rb +83 -0
- data/lib/language_server/protocol/interface/file_operation_pattern.rb +8 -10
- data/lib/language_server/protocol/interface/file_operation_pattern_options.rb +3 -1
- data/lib/language_server/protocol/interface/file_operation_registration_options.rb +2 -0
- data/lib/language_server/protocol/interface/file_rename.rb +2 -0
- data/lib/language_server/protocol/interface/file_system_watcher.rb +4 -14
- data/lib/language_server/protocol/interface/folding_range.rb +30 -23
- data/lib/language_server/protocol/interface/folding_range_client_capabilities.rb +26 -4
- data/lib/language_server/protocol/interface/folding_range_options.rb +1 -1
- data/lib/language_server/protocol/interface/folding_range_params.rb +17 -14
- data/lib/language_server/protocol/interface/folding_range_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/formatting_options.rb +10 -4
- data/lib/language_server/protocol/interface/full_document_diagnostic_report.rb +58 -0
- data/lib/language_server/protocol/interface/general_client_capabilities.rb +91 -0
- data/lib/language_server/protocol/interface/glob_pattern.rb +48 -0
- data/lib/language_server/protocol/interface/hover.rb +3 -3
- data/lib/language_server/protocol/interface/hover_client_capabilities.rb +4 -5
- data/lib/language_server/protocol/interface/hover_options.rb +4 -1
- data/lib/language_server/protocol/interface/hover_params.rb +4 -1
- data/lib/language_server/protocol/interface/hover_registration_options.rb +7 -4
- data/lib/language_server/protocol/interface/implementation_client_capabilities.rb +10 -5
- 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 +2 -1
- data/lib/language_server/protocol/interface/initialize_params.rb +41 -29
- data/lib/language_server/protocol/interface/initialize_result.rb +6 -1
- data/lib/language_server/protocol/interface/inlay_hint.rb +118 -0
- data/lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb +48 -0
- data/lib/language_server/protocol/interface/inlay_hint_label_part.rb +81 -0
- data/lib/language_server/protocol/interface/inlay_hint_options.rb +45 -0
- data/lib/language_server/protocol/interface/inlay_hint_params.rb +56 -0
- data/lib/language_server/protocol/interface/inlay_hint_registration_options.rb +65 -0
- data/lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/inline_value.rb +78 -0
- data/lib/language_server/protocol/interface/inline_value_client_capabilities.rb +38 -0
- data/lib/language_server/protocol/interface/inline_value_context.rb +46 -0
- data/lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb +50 -0
- data/lib/language_server/protocol/interface/inline_value_options.rb +35 -0
- data/lib/language_server/protocol/interface/inline_value_params.rb +66 -0
- data/lib/language_server/protocol/interface/inline_value_registration_options.rb +55 -0
- data/lib/language_server/protocol/interface/inline_value_text.rb +47 -0
- data/lib/language_server/protocol/interface/inline_value_variable_lookup.rb +59 -0
- data/lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb +44 -0
- data/lib/language_server/protocol/interface/insert_replace_edit.rb +2 -0
- data/lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb +8 -4
- 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 -2
- data/lib/language_server/protocol/interface/location.rb +5 -1
- data/lib/language_server/protocol/interface/location_link.rb +13 -11
- data/lib/language_server/protocol/interface/log_message_params.rb +4 -1
- data/lib/language_server/protocol/interface/log_trace_params.rb +1 -8
- data/lib/language_server/protocol/interface/{message.rb → lsp_object.rb} +6 -8
- data/lib/language_server/protocol/interface/markdown_client_capabilities.rb +16 -2
- data/lib/language_server/protocol/interface/markup_content.rb +16 -18
- data/lib/language_server/protocol/interface/moniker.rb +3 -1
- data/lib/language_server/protocol/interface/moniker_client_capabilities.rb +9 -5
- 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 +73 -0
- data/lib/language_server/protocol/interface/notebook_cell_array_change.rb +57 -0
- data/lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb +54 -0
- data/lib/language_server/protocol/interface/notebook_document.rb +78 -0
- data/lib/language_server/protocol/interface/notebook_document_change_event.rb +49 -0
- data/lib/language_server/protocol/interface/notebook_document_client_capabilities.rb +40 -0
- data/lib/language_server/protocol/interface/notebook_document_filter.rb +58 -0
- data/lib/language_server/protocol/interface/notebook_document_identifier.rb +38 -0
- data/lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb +50 -0
- data/lib/language_server/protocol/interface/notebook_document_sync_options.rb +58 -0
- data/lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb +58 -0
- data/lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb +17 -18
- data/lib/language_server/protocol/interface/parameter_information.rb +7 -9
- data/lib/language_server/protocol/interface/partial_result_params.rb +3 -3
- data/lib/language_server/protocol/interface/position.rb +40 -7
- data/lib/language_server/protocol/interface/prepare_rename_params.rb +10 -1
- data/lib/language_server/protocol/interface/prepare_rename_result.rb +60 -0
- data/lib/language_server/protocol/interface/previous_result_id.rb +48 -0
- data/lib/language_server/protocol/interface/progress_params.rb +1 -1
- data/lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb +16 -5
- data/lib/language_server/protocol/interface/publish_diagnostics_params.rb +8 -4
- data/lib/language_server/protocol/interface/range.rb +13 -0
- data/lib/language_server/protocol/interface/reference_client_capabilities.rb +4 -1
- data/lib/language_server/protocol/interface/reference_context.rb +4 -0
- data/lib/language_server/protocol/interface/reference_options.rb +4 -1
- data/lib/language_server/protocol/interface/reference_params.rb +14 -11
- data/lib/language_server/protocol/interface/reference_registration_options.rb +7 -4
- data/lib/language_server/protocol/interface/registration.rb +2 -2
- data/lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb +3 -1
- data/lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb +73 -0
- data/lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb +66 -0
- data/lib/language_server/protocol/interface/relative_pattern.rb +50 -0
- data/lib/language_server/protocol/interface/rename_client_capabilities.rb +12 -7
- data/lib/language_server/protocol/interface/rename_file.rb +7 -5
- data/lib/language_server/protocol/interface/rename_file_options.rb +2 -2
- data/lib/language_server/protocol/interface/rename_files_params.rb +6 -4
- data/lib/language_server/protocol/interface/rename_options.rb +13 -8
- data/lib/language_server/protocol/interface/rename_params.rb +15 -12
- data/lib/language_server/protocol/interface/rename_registration_options.rb +16 -11
- data/lib/language_server/protocol/interface/resource_operation.rb +47 -0
- data/lib/language_server/protocol/interface/save_options.rb +4 -1
- data/lib/language_server/protocol/interface/selection_range.rb +6 -3
- data/lib/language_server/protocol/interface/selection_range_client_capabilities.rb +4 -5
- data/lib/language_server/protocol/interface/selection_range_options.rb +1 -1
- data/lib/language_server/protocol/interface/selection_range_params.rb +23 -20
- data/lib/language_server/protocol/interface/selection_range_registration_options.rb +5 -5
- data/lib/language_server/protocol/interface/semantic_tokens.rb +5 -2
- data/lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb +45 -11
- data/lib/language_server/protocol/interface/semantic_tokens_delta.rb +5 -3
- data/lib/language_server/protocol/interface/semantic_tokens_delta_params.rb +24 -21
- data/lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb +3 -0
- data/lib/language_server/protocol/interface/semantic_tokens_edit.rb +6 -3
- data/lib/language_server/protocol/interface/semantic_tokens_legend.rb +3 -0
- data/lib/language_server/protocol/interface/semantic_tokens_options.rb +12 -9
- data/lib/language_server/protocol/interface/semantic_tokens_params.rb +17 -14
- data/lib/language_server/protocol/interface/semantic_tokens_partial_result.rb +4 -1
- data/lib/language_server/protocol/interface/semantic_tokens_range_params.rb +23 -20
- data/lib/language_server/protocol/interface/semantic_tokens_registration_options.rb +16 -13
- data/lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb +5 -2
- data/lib/language_server/protocol/interface/server_capabilities.rb +139 -56
- data/lib/language_server/protocol/interface/set_trace_params.rb +1 -4
- data/lib/language_server/protocol/interface/show_document_client_capabilities.rb +4 -2
- data/lib/language_server/protocol/interface/show_document_params.rb +6 -4
- data/lib/language_server/protocol/interface/show_document_result.rb +3 -1
- data/lib/language_server/protocol/interface/show_message_params.rb +4 -1
- 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 +3 -4
- data/lib/language_server/protocol/interface/signature_help_client_capabilities.rb +8 -3
- data/lib/language_server/protocol/interface/signature_help_context.rb +10 -11
- data/lib/language_server/protocol/interface/signature_help_options.rb +17 -14
- data/lib/language_server/protocol/interface/signature_help_params.rb +17 -13
- data/lib/language_server/protocol/interface/signature_help_registration_options.rb +20 -17
- data/lib/language_server/protocol/interface/signature_information.rb +5 -3
- data/lib/language_server/protocol/interface/static_registration_options.rb +3 -2
- data/lib/language_server/protocol/interface/symbol_information.rb +34 -30
- data/lib/language_server/protocol/interface/t.rb +24 -0
- data/lib/language_server/protocol/interface/text_document_change_registration_options.rb +12 -13
- data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +108 -43
- data/lib/language_server/protocol/interface/text_document_content_change_event.rb +8 -10
- data/lib/language_server/protocol/interface/text_document_edit.rb +10 -1
- data/lib/language_server/protocol/interface/text_document_filter.rb +69 -0
- data/lib/language_server/protocol/interface/text_document_identifier.rb +5 -2
- data/lib/language_server/protocol/interface/text_document_item.rb +7 -3
- data/lib/language_server/protocol/interface/text_document_position_params.rb +4 -0
- 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 +7 -4
- 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 +15 -17
- data/lib/language_server/protocol/interface/text_edit.rb +3 -0
- data/lib/language_server/protocol/interface/type_definition_client_capabilities.rb +10 -5
- 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_client_capabilities.rb +38 -0
- data/lib/language_server/protocol/interface/type_hierarchy_item.rb +105 -0
- data/lib/language_server/protocol/interface/type_hierarchy_options.rb +35 -0
- data/lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb +56 -0
- data/lib/language_server/protocol/interface/type_hierarchy_registration_options.rb +55 -0
- data/lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb +54 -0
- data/lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb +54 -0
- data/lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb +52 -0
- data/lib/language_server/protocol/interface/unregistration.rb +2 -2
- data/lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb +47 -0
- 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/window_client_capabilities.rb +63 -0
- 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 +6 -7
- data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +176 -0
- data/lib/language_server/protocol/interface/workspace_diagnostic_params.rb +67 -0
- data/lib/language_server/protocol/interface/workspace_diagnostic_report.rb +35 -0
- data/lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb +35 -0
- data/lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb +77 -0
- data/lib/language_server/protocol/interface/workspace_edit.rb +28 -17
- data/lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb +15 -6
- data/lib/language_server/protocol/interface/workspace_folder.rb +4 -1
- data/lib/language_server/protocol/interface/workspace_folders_initialize_params.rb +39 -0
- 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 +77 -0
- data/lib/language_server/protocol/interface/workspace_symbol.rb +95 -0
- data/lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb +23 -6
- data/lib/language_server/protocol/interface/workspace_symbol_options.rb +17 -2
- data/lib/language_server/protocol/interface/workspace_symbol_params.rb +16 -16
- data/lib/language_server/protocol/interface/workspace_symbol_registration_options.rb +17 -2
- data/lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb +70 -0
- data/lib/language_server/protocol/interface.rb +156 -14
- data/lib/language_server/protocol/transport/io/reader.rb +8 -24
- data/lib/language_server/protocol/transport/io/writer.rb +1 -0
- data/lib/language_server/protocol/version.rb +1 -1
- metadata +92 -24
- data/lib/language_server/protocol/constant/initialize_error.rb +0 -16
- data/lib/language_server/protocol/interface/notification_message.rb +0 -48
- data/lib/language_server/protocol/interface/request_message.rb +0 -57
- data/lib/language_server/protocol/interface/response_error.rb +0 -52
- data/lib/language_server/protocol/interface/response_message.rb +0 -58
@@ -2,38 +2,31 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
class InitializeParams
|
5
|
-
def initialize(
|
5
|
+
def initialize(process_id:, client_info: nil, locale: nil, root_path: nil, root_uri:, capabilities:, initialization_options: nil, trace: nil, work_done_token: nil, workspace_folders: nil)
|
6
6
|
@attributes = {}
|
7
7
|
|
8
|
-
@attributes[:workDoneToken] = work_done_token if work_done_token
|
9
8
|
@attributes[:processId] = process_id
|
10
9
|
@attributes[:clientInfo] = client_info if client_info
|
11
10
|
@attributes[:locale] = locale if locale
|
12
11
|
@attributes[:rootPath] = root_path if root_path
|
13
12
|
@attributes[:rootUri] = root_uri
|
14
|
-
@attributes[:initializationOptions] = initialization_options if initialization_options
|
15
13
|
@attributes[:capabilities] = capabilities
|
14
|
+
@attributes[:initializationOptions] = initialization_options if initialization_options
|
16
15
|
@attributes[:trace] = trace if trace
|
16
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
17
17
|
@attributes[:workspaceFolders] = workspace_folders if workspace_folders
|
18
18
|
|
19
19
|
@attributes.freeze
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
# @return [ProgressToken]
|
26
|
-
def work_done_token
|
27
|
-
attributes.fetch(:workDoneToken)
|
28
|
-
end
|
29
|
-
|
23
|
+
# The process Id of the parent process that started
|
24
|
+
# the server.
|
30
25
|
#
|
31
|
-
#
|
32
|
-
# the process
|
33
|
-
# process is not alive then the server should exit (see exit notification)
|
34
|
-
# its process.
|
26
|
+
# Is `null` if the process has not been started by another process.
|
27
|
+
# If the parent process is not alive then the server should exit.
|
35
28
|
#
|
36
|
-
# @return [
|
29
|
+
# @return [integer | null]
|
37
30
|
def process_id
|
38
31
|
attributes.fetch(:processId)
|
39
32
|
end
|
@@ -41,7 +34,9 @@ module LanguageServer
|
|
41
34
|
#
|
42
35
|
# Information about the client
|
43
36
|
#
|
44
|
-
# @
|
37
|
+
# @since 3.15.0
|
38
|
+
#
|
39
|
+
# @return [{ name:string, version:string } | nil]
|
45
40
|
def client_info
|
46
41
|
attributes.fetch(:clientInfo)
|
47
42
|
end
|
@@ -54,7 +49,9 @@ module LanguageServer
|
|
54
49
|
# Uses IETF language tags as the value's syntax
|
55
50
|
# (See https://en.wikipedia.org/wiki/IETF_language_tag)
|
56
51
|
#
|
57
|
-
# @
|
52
|
+
# @since 3.16.0
|
53
|
+
#
|
54
|
+
# @return [string | nil]
|
58
55
|
def locale
|
59
56
|
attributes.fetch(:locale)
|
60
57
|
end
|
@@ -63,7 +60,9 @@ module LanguageServer
|
|
63
60
|
# The rootPath of the workspace. Is null
|
64
61
|
# if no folder is open.
|
65
62
|
#
|
66
|
-
# @
|
63
|
+
# @deprecated in favour of rootUri.
|
64
|
+
#
|
65
|
+
# @return [string | null]
|
67
66
|
def root_path
|
68
67
|
attributes.fetch(:rootPath)
|
69
68
|
end
|
@@ -73,19 +72,13 @@ module LanguageServer
|
|
73
72
|
# folder is open. If both `rootPath` and `rootUri` are set
|
74
73
|
# `rootUri` wins.
|
75
74
|
#
|
76
|
-
# @
|
75
|
+
# @deprecated in favour of workspaceFolders.
|
76
|
+
#
|
77
|
+
# @return [DocumentUri | null]
|
77
78
|
def root_uri
|
78
79
|
attributes.fetch(:rootUri)
|
79
80
|
end
|
80
81
|
|
81
|
-
#
|
82
|
-
# User provided initialization options.
|
83
|
-
#
|
84
|
-
# @return [any]
|
85
|
-
def initialization_options
|
86
|
-
attributes.fetch(:initializationOptions)
|
87
|
-
end
|
88
|
-
|
89
82
|
#
|
90
83
|
# The capabilities provided by the client (editor or tool)
|
91
84
|
#
|
@@ -94,21 +87,40 @@ module LanguageServer
|
|
94
87
|
attributes.fetch(:capabilities)
|
95
88
|
end
|
96
89
|
|
90
|
+
#
|
91
|
+
# User provided initialization options.
|
92
|
+
#
|
93
|
+
# @return [LSPAny | nil]
|
94
|
+
def initialization_options
|
95
|
+
attributes.fetch(:initializationOptions)
|
96
|
+
end
|
97
|
+
|
97
98
|
#
|
98
99
|
# The initial trace setting. If omitted trace is disabled ('off').
|
99
100
|
#
|
100
|
-
# @return [
|
101
|
+
# @return ["off" | "messages" | "compact" | "verbose" | nil]
|
101
102
|
def trace
|
102
103
|
attributes.fetch(:trace)
|
103
104
|
end
|
104
105
|
|
106
|
+
#
|
107
|
+
# An optional token that a server can use to report work done progress.
|
108
|
+
#
|
109
|
+
# @return [ProgressToken | nil]
|
110
|
+
def work_done_token
|
111
|
+
attributes.fetch(:workDoneToken)
|
112
|
+
end
|
113
|
+
|
105
114
|
#
|
106
115
|
# The workspace folders configured in the client when the server starts.
|
116
|
+
#
|
107
117
|
# This property is only available if the client supports workspace folders.
|
108
118
|
# It can be `null` if the client supports workspace folders but none are
|
109
119
|
# configured.
|
110
120
|
#
|
111
|
-
# @
|
121
|
+
# @since 3.6.0
|
122
|
+
#
|
123
|
+
# @return [WorkspaceFolder[] | null]
|
112
124
|
def workspace_folders
|
113
125
|
attributes.fetch(:workspaceFolders)
|
114
126
|
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
+
#
|
5
|
+
# The result returned from an initialize request.
|
6
|
+
#
|
4
7
|
class InitializeResult
|
5
8
|
def initialize(capabilities:, server_info: nil)
|
6
9
|
@attributes = {}
|
@@ -22,7 +25,9 @@ module LanguageServer
|
|
22
25
|
#
|
23
26
|
# Information about the server.
|
24
27
|
#
|
25
|
-
# @
|
28
|
+
# @since 3.15.0
|
29
|
+
#
|
30
|
+
# @return [{ name:string, version:string } | nil]
|
26
31
|
def server_info
|
27
32
|
attributes.fetch(:serverInfo)
|
28
33
|
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Inlay hint information.
|
6
|
+
#
|
7
|
+
# @since 3.17.0
|
8
|
+
#
|
9
|
+
class InlayHint
|
10
|
+
def initialize(position:, label:, kind: nil, text_edits: nil, tooltip: nil, padding_left: nil, padding_right: nil, data: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:position] = position
|
14
|
+
@attributes[:label] = label
|
15
|
+
@attributes[:kind] = kind if kind
|
16
|
+
@attributes[:textEdits] = text_edits if text_edits
|
17
|
+
@attributes[:tooltip] = tooltip if tooltip
|
18
|
+
@attributes[:paddingLeft] = padding_left if padding_left
|
19
|
+
@attributes[:paddingRight] = padding_right if padding_right
|
20
|
+
@attributes[:data] = data if data
|
21
|
+
|
22
|
+
@attributes.freeze
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# The position of this hint.
|
27
|
+
#
|
28
|
+
# @return [Position]
|
29
|
+
def position
|
30
|
+
attributes.fetch(:position)
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# The label of this hint. A human readable string or an array of
|
35
|
+
# InlayHintLabelPart label parts.
|
36
|
+
#
|
37
|
+
# *Note* that neither the string nor the label part can be empty.
|
38
|
+
#
|
39
|
+
# @return [string | InlayHintLabelPart[]]
|
40
|
+
def label
|
41
|
+
attributes.fetch(:label)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The kind of this hint. Can be omitted in which case the client
|
46
|
+
# should fall back to a reasonable default.
|
47
|
+
#
|
48
|
+
# @return [InlayHintKind | nil]
|
49
|
+
def kind
|
50
|
+
attributes.fetch(:kind)
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Optional text edits that are performed when accepting this inlay hint.
|
55
|
+
#
|
56
|
+
# *Note* that edits are expected to change the document so that the inlay
|
57
|
+
# hint (or its nearest variant) is now part of the document and the inlay
|
58
|
+
# hint itself is now obsolete.
|
59
|
+
#
|
60
|
+
# @return [TextEdit[] | nil]
|
61
|
+
def text_edits
|
62
|
+
attributes.fetch(:textEdits)
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# The tooltip text when you hover over this item.
|
67
|
+
#
|
68
|
+
# @return [string | MarkupContent | nil]
|
69
|
+
def tooltip
|
70
|
+
attributes.fetch(:tooltip)
|
71
|
+
end
|
72
|
+
|
73
|
+
#
|
74
|
+
# Render padding before the hint.
|
75
|
+
#
|
76
|
+
# Note: Padding should use the editor's background color, not the
|
77
|
+
# background color of the hint itself. That means padding can be used
|
78
|
+
# to visually align/separate an inlay hint.
|
79
|
+
#
|
80
|
+
# @return [boolean | nil]
|
81
|
+
def padding_left
|
82
|
+
attributes.fetch(:paddingLeft)
|
83
|
+
end
|
84
|
+
|
85
|
+
#
|
86
|
+
# Render padding after the hint.
|
87
|
+
#
|
88
|
+
# Note: Padding should use the editor's background color, not the
|
89
|
+
# background color of the hint itself. That means padding can be used
|
90
|
+
# to visually align/separate an inlay hint.
|
91
|
+
#
|
92
|
+
# @return [boolean | nil]
|
93
|
+
def padding_right
|
94
|
+
attributes.fetch(:paddingRight)
|
95
|
+
end
|
96
|
+
|
97
|
+
#
|
98
|
+
# A data entry field that is preserved on an inlay hint between
|
99
|
+
# a `textDocument/inlayHint` and a `inlayHint/resolve` request.
|
100
|
+
#
|
101
|
+
# @return [LSPAny | nil]
|
102
|
+
def data
|
103
|
+
attributes.fetch(:data)
|
104
|
+
end
|
105
|
+
|
106
|
+
attr_reader :attributes
|
107
|
+
|
108
|
+
def to_hash
|
109
|
+
attributes
|
110
|
+
end
|
111
|
+
|
112
|
+
def to_json(*args)
|
113
|
+
to_hash.to_json(*args)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Inlay hint client capabilities.
|
6
|
+
#
|
7
|
+
# @since 3.17.0
|
8
|
+
#
|
9
|
+
class InlayHintClientCapabilities
|
10
|
+
def initialize(dynamic_registration: nil, resolve_support: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
|
14
|
+
@attributes[:resolveSupport] = resolve_support if resolve_support
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Whether inlay hints support dynamic registration.
|
21
|
+
#
|
22
|
+
# @return [boolean | nil]
|
23
|
+
def dynamic_registration
|
24
|
+
attributes.fetch(:dynamicRegistration)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Indicates which properties a client can resolve lazily on an inlay
|
29
|
+
# hint.
|
30
|
+
#
|
31
|
+
# @return [{ properties:string[] } | nil]
|
32
|
+
def resolve_support
|
33
|
+
attributes.fetch(:resolveSupport)
|
34
|
+
end
|
35
|
+
|
36
|
+
attr_reader :attributes
|
37
|
+
|
38
|
+
def to_hash
|
39
|
+
attributes
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_json(*args)
|
43
|
+
to_hash.to_json(*args)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# An inlay hint label part allows for interactive and composite labels
|
6
|
+
# of inlay hints.
|
7
|
+
#
|
8
|
+
# @since 3.17.0
|
9
|
+
#
|
10
|
+
class InlayHintLabelPart
|
11
|
+
def initialize(value:, tooltip: nil, location: nil, command: nil)
|
12
|
+
@attributes = {}
|
13
|
+
|
14
|
+
@attributes[:value] = value
|
15
|
+
@attributes[:tooltip] = tooltip if tooltip
|
16
|
+
@attributes[:location] = location if location
|
17
|
+
@attributes[:command] = command if command
|
18
|
+
|
19
|
+
@attributes.freeze
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# The value of this label part.
|
24
|
+
#
|
25
|
+
# @return [string]
|
26
|
+
def value
|
27
|
+
attributes.fetch(:value)
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# The tooltip text when you hover over this label part. Depending on
|
32
|
+
# the client capability `inlayHint.resolveSupport` clients might resolve
|
33
|
+
# this property late using the resolve request.
|
34
|
+
#
|
35
|
+
# @return [string | MarkupContent | nil]
|
36
|
+
def tooltip
|
37
|
+
attributes.fetch(:tooltip)
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# An optional source code location that represents this
|
42
|
+
# label part.
|
43
|
+
#
|
44
|
+
# The editor will use this location for the hover and for code navigation
|
45
|
+
# features: This part will become a clickable link that resolves to the
|
46
|
+
# definition of the symbol at the given location (not necessarily the
|
47
|
+
# location itself), it shows the hover that shows at the given location,
|
48
|
+
# and it shows a context menu with further code navigation commands.
|
49
|
+
#
|
50
|
+
# Depending on the client capability `inlayHint.resolveSupport` clients
|
51
|
+
# might resolve this property late using the resolve request.
|
52
|
+
#
|
53
|
+
# @return [Location | nil]
|
54
|
+
def location
|
55
|
+
attributes.fetch(:location)
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# An optional command for this label part.
|
60
|
+
#
|
61
|
+
# Depending on the client capability `inlayHint.resolveSupport` clients
|
62
|
+
# might resolve this property late using the resolve request.
|
63
|
+
#
|
64
|
+
# @return [Command | nil]
|
65
|
+
def command
|
66
|
+
attributes.fetch(:command)
|
67
|
+
end
|
68
|
+
|
69
|
+
attr_reader :attributes
|
70
|
+
|
71
|
+
def to_hash
|
72
|
+
attributes
|
73
|
+
end
|
74
|
+
|
75
|
+
def to_json(*args)
|
76
|
+
to_hash.to_json(*args)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Inlay hint options used during static registration.
|
6
|
+
#
|
7
|
+
# @since 3.17.0
|
8
|
+
#
|
9
|
+
class InlayHintOptions
|
10
|
+
def initialize(resolve_provider: nil, work_done_progress: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
14
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
15
|
+
|
16
|
+
@attributes.freeze
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# The server provides support to resolve additional
|
21
|
+
# information for an inlay hint item.
|
22
|
+
#
|
23
|
+
# @return [boolean | nil]
|
24
|
+
def resolve_provider
|
25
|
+
attributes.fetch(:resolveProvider)
|
26
|
+
end
|
27
|
+
|
28
|
+
# @return [boolean | nil]
|
29
|
+
def work_done_progress
|
30
|
+
attributes.fetch(:workDoneProgress)
|
31
|
+
end
|
32
|
+
|
33
|
+
attr_reader :attributes
|
34
|
+
|
35
|
+
def to_hash
|
36
|
+
attributes
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_json(*args)
|
40
|
+
to_hash.to_json(*args)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# A parameter literal used in inlay hint requests.
|
6
|
+
#
|
7
|
+
# @since 3.17.0
|
8
|
+
#
|
9
|
+
class InlayHintParams
|
10
|
+
def initialize(text_document:, range:, work_done_token: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:textDocument] = text_document
|
14
|
+
@attributes[:range] = range
|
15
|
+
@attributes[:workDoneToken] = work_done_token if work_done_token
|
16
|
+
|
17
|
+
@attributes.freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# The text document.
|
22
|
+
#
|
23
|
+
# @return [TextDocumentIdentifier]
|
24
|
+
def text_document
|
25
|
+
attributes.fetch(:textDocument)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# The document range for which inlay hints should be computed.
|
30
|
+
#
|
31
|
+
# @return [Range]
|
32
|
+
def range
|
33
|
+
attributes.fetch(:range)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# An optional token that a server can use to report work done progress.
|
38
|
+
#
|
39
|
+
# @return [ProgressToken | nil]
|
40
|
+
def work_done_token
|
41
|
+
attributes.fetch(:workDoneToken)
|
42
|
+
end
|
43
|
+
|
44
|
+
attr_reader :attributes
|
45
|
+
|
46
|
+
def to_hash
|
47
|
+
attributes
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_json(*args)
|
51
|
+
to_hash.to_json(*args)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Inlay hint options used during static or dynamic registration.
|
6
|
+
#
|
7
|
+
# @since 3.17.0
|
8
|
+
#
|
9
|
+
class InlayHintRegistrationOptions
|
10
|
+
def initialize(resolve_provider: nil, work_done_progress: nil, document_selector:, id: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
14
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
15
|
+
@attributes[:documentSelector] = document_selector
|
16
|
+
@attributes[:id] = id if id
|
17
|
+
|
18
|
+
@attributes.freeze
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# The server provides support to resolve additional
|
23
|
+
# information for an inlay hint item.
|
24
|
+
#
|
25
|
+
# @return [boolean | nil]
|
26
|
+
def resolve_provider
|
27
|
+
attributes.fetch(:resolveProvider)
|
28
|
+
end
|
29
|
+
|
30
|
+
# @return [boolean | nil]
|
31
|
+
def work_done_progress
|
32
|
+
attributes.fetch(:workDoneProgress)
|
33
|
+
end
|
34
|
+
|
35
|
+
#
|
36
|
+
# A document selector to identify the scope of the registration. If set to null
|
37
|
+
# the document selector provided on the client side will be used.
|
38
|
+
#
|
39
|
+
# @return [DocumentSelector | null]
|
40
|
+
def document_selector
|
41
|
+
attributes.fetch(:documentSelector)
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# The id used to register the request. The id can be used to deregister
|
46
|
+
# the request again. See also Registration#id.
|
47
|
+
#
|
48
|
+
# @return [string | nil]
|
49
|
+
def id
|
50
|
+
attributes.fetch(:id)
|
51
|
+
end
|
52
|
+
|
53
|
+
attr_reader :attributes
|
54
|
+
|
55
|
+
def to_hash
|
56
|
+
attributes
|
57
|
+
end
|
58
|
+
|
59
|
+
def to_json(*args)
|
60
|
+
to_hash.to_json(*args)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Client workspace capabilities specific to inlay hints.
|
6
|
+
#
|
7
|
+
# @since 3.17.0
|
8
|
+
#
|
9
|
+
class InlayHintWorkspaceClientCapabilities
|
10
|
+
def initialize(refresh_support: nil)
|
11
|
+
@attributes = {}
|
12
|
+
|
13
|
+
@attributes[:refreshSupport] = refresh_support if refresh_support
|
14
|
+
|
15
|
+
@attributes.freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
#
|
19
|
+
# Whether the client implementation supports a refresh request sent from
|
20
|
+
# the server to the client.
|
21
|
+
#
|
22
|
+
# Note that this event is global and will force the client to refresh all
|
23
|
+
# inlay hints currently shown. It should be used with absolute care and
|
24
|
+
# is useful for situation where a server for example detects a project wide
|
25
|
+
# change that requires such a calculation.
|
26
|
+
#
|
27
|
+
# @return [boolean | nil]
|
28
|
+
def refresh_support
|
29
|
+
attributes.fetch(:refreshSupport)
|
30
|
+
end
|
31
|
+
|
32
|
+
attr_reader :attributes
|
33
|
+
|
34
|
+
def to_hash
|
35
|
+
attributes
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_json(*args)
|
39
|
+
to_hash.to_json(*args)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module LanguageServer
|
2
|
+
module Protocol
|
3
|
+
module Interface
|
4
|
+
#
|
5
|
+
# Inline value information can be provided by different means:
|
6
|
+
# - directly as a text value (class InlineValueText).
|
7
|
+
# - as a name to use for a variable lookup (class InlineValueVariableLookup)
|
8
|
+
# - as an evaluatable expression (class InlineValueEvaluatableExpression)
|
9
|
+
# The InlineValue types combines all inline value types into one type.
|
10
|
+
#
|
11
|
+
# @since 3.17.0
|
12
|
+
#
|
13
|
+
class InlineValue
|
14
|
+
def initialize(range:, text:, variable_name: nil, case_sensitive_lookup:, expression: nil)
|
15
|
+
@attributes = {}
|
16
|
+
|
17
|
+
@attributes[:range] = range
|
18
|
+
@attributes[:text] = text
|
19
|
+
@attributes[:variableName] = variable_name if variable_name
|
20
|
+
@attributes[:caseSensitiveLookup] = case_sensitive_lookup
|
21
|
+
@attributes[:expression] = expression if expression
|
22
|
+
|
23
|
+
@attributes.freeze
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# The document range for which the inline value applies.
|
28
|
+
#
|
29
|
+
# @return [Range]
|
30
|
+
def range
|
31
|
+
attributes.fetch(:range)
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# The text of the inline value.
|
36
|
+
#
|
37
|
+
# @return [string]
|
38
|
+
def text
|
39
|
+
attributes.fetch(:text)
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# If specified the name of the variable to look up.
|
44
|
+
#
|
45
|
+
# @return [string | nil]
|
46
|
+
def variable_name
|
47
|
+
attributes.fetch(:variableName)
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# How to perform the lookup.
|
52
|
+
#
|
53
|
+
# @return [boolean]
|
54
|
+
def case_sensitive_lookup
|
55
|
+
attributes.fetch(:caseSensitiveLookup)
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# If specified the expression overrides the extracted expression.
|
60
|
+
#
|
61
|
+
# @return [string | nil]
|
62
|
+
def expression
|
63
|
+
attributes.fetch(:expression)
|
64
|
+
end
|
65
|
+
|
66
|
+
attr_reader :attributes
|
67
|
+
|
68
|
+
def to_hash
|
69
|
+
attributes
|
70
|
+
end
|
71
|
+
|
72
|
+
def to_json(*args)
|
73
|
+
to_hash.to_json(*args)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|