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
@@ -1,10 +1,6 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# A completion item represents a text snippet that is
|
6
|
-
# proposed to complete text that is being typed.
|
7
|
-
#
|
8
4
|
class CompletionItem
|
9
5
|
def initialize(label:, label_details: nil, kind: nil, tags: nil, detail: nil, documentation: nil, deprecated: nil, preselect: nil, sort_text: nil, filter_text: nil, insert_text: nil, insert_text_format: nil, insert_text_mode: nil, text_edit: nil, text_edit_text: nil, additional_text_edits: nil, commit_characters: nil, command: nil, data: nil)
|
10
6
|
@attributes = {}
|
@@ -49,18 +45,17 @@ module LanguageServer
|
|
49
45
|
#
|
50
46
|
# Additional details for the label
|
51
47
|
#
|
52
|
-
# @
|
53
|
-
#
|
54
|
-
# @return [CompletionItemLabelDetails | nil]
|
48
|
+
# @return [CompletionItemLabelDetails]
|
55
49
|
def label_details
|
56
50
|
attributes.fetch(:labelDetails)
|
57
51
|
end
|
58
52
|
|
59
53
|
#
|
60
54
|
# The kind of this completion item. Based of the kind
|
61
|
-
# an icon is chosen by the editor.
|
55
|
+
# an icon is chosen by the editor. The standardized set
|
56
|
+
# of available values is defined in `CompletionItemKind`.
|
62
57
|
#
|
63
|
-
# @return [CompletionItemKind
|
58
|
+
# @return [CompletionItemKind]
|
64
59
|
def kind
|
65
60
|
attributes.fetch(:kind)
|
66
61
|
end
|
@@ -68,9 +63,7 @@ module LanguageServer
|
|
68
63
|
#
|
69
64
|
# Tags for this completion item.
|
70
65
|
#
|
71
|
-
# @
|
72
|
-
#
|
73
|
-
# @return [CompletionItemTag[] | nil]
|
66
|
+
# @return [1[]]
|
74
67
|
def tags
|
75
68
|
attributes.fetch(:tags)
|
76
69
|
end
|
@@ -79,7 +72,7 @@ module LanguageServer
|
|
79
72
|
# A human-readable string with additional information
|
80
73
|
# about this item, like type or symbol information.
|
81
74
|
#
|
82
|
-
# @return [string
|
75
|
+
# @return [string]
|
83
76
|
def detail
|
84
77
|
attributes.fetch(:detail)
|
85
78
|
end
|
@@ -87,16 +80,15 @@ module LanguageServer
|
|
87
80
|
#
|
88
81
|
# A human-readable string that represents a doc-comment.
|
89
82
|
#
|
90
|
-
# @return [string | MarkupContent
|
83
|
+
# @return [string | MarkupContent]
|
91
84
|
def documentation
|
92
85
|
attributes.fetch(:documentation)
|
93
86
|
end
|
94
87
|
|
95
88
|
#
|
96
89
|
# Indicates if this item is deprecated.
|
97
|
-
# @deprecated Use `tags` instead.
|
98
90
|
#
|
99
|
-
# @return [boolean
|
91
|
+
# @return [boolean]
|
100
92
|
def deprecated
|
101
93
|
attributes.fetch(:deprecated)
|
102
94
|
end
|
@@ -108,35 +100,35 @@ module LanguageServer
|
|
108
100
|
# tool / client decides which item that is. The rule is that the *first*
|
109
101
|
# item of those that match best is selected.
|
110
102
|
#
|
111
|
-
# @return [boolean
|
103
|
+
# @return [boolean]
|
112
104
|
def preselect
|
113
105
|
attributes.fetch(:preselect)
|
114
106
|
end
|
115
107
|
|
116
108
|
#
|
117
109
|
# A string that should be used when comparing this item
|
118
|
-
# with other items. When `falsy` the
|
119
|
-
#
|
110
|
+
# with other items. When `falsy` the label is used
|
111
|
+
# as the sort text for this item.
|
120
112
|
#
|
121
|
-
# @return [string
|
113
|
+
# @return [string]
|
122
114
|
def sort_text
|
123
115
|
attributes.fetch(:sortText)
|
124
116
|
end
|
125
117
|
|
126
118
|
#
|
127
119
|
# A string that should be used when filtering a set of
|
128
|
-
# completion items. When `falsy` the
|
129
|
-
#
|
120
|
+
# completion items. When `falsy` the label is used as the
|
121
|
+
# filter text for this item.
|
130
122
|
#
|
131
|
-
# @return [string
|
123
|
+
# @return [string]
|
132
124
|
def filter_text
|
133
125
|
attributes.fetch(:filterText)
|
134
126
|
end
|
135
127
|
|
136
128
|
#
|
137
129
|
# A string that should be inserted into a document when selecting
|
138
|
-
# this completion. When `falsy` the
|
139
|
-
#
|
130
|
+
# this completion. When `falsy` the label is used as the insert text
|
131
|
+
# for this item.
|
140
132
|
#
|
141
133
|
# The `insertText` is subject to interpretation by the client side.
|
142
134
|
# Some tools might not take the string literally. For example
|
@@ -146,7 +138,7 @@ module LanguageServer
|
|
146
138
|
# recommended to use `textEdit` instead since it avoids additional client
|
147
139
|
# side interpretation.
|
148
140
|
#
|
149
|
-
# @return [string
|
141
|
+
# @return [string]
|
150
142
|
def insert_text
|
151
143
|
attributes.fetch(:insertText)
|
152
144
|
end
|
@@ -159,35 +151,35 @@ module LanguageServer
|
|
159
151
|
# Please note that the insertTextFormat doesn't apply to
|
160
152
|
# `additionalTextEdits`.
|
161
153
|
#
|
162
|
-
# @return [InsertTextFormat
|
154
|
+
# @return [InsertTextFormat]
|
163
155
|
def insert_text_format
|
164
156
|
attributes.fetch(:insertTextFormat)
|
165
157
|
end
|
166
158
|
|
167
159
|
#
|
168
160
|
# How whitespace and indentation is handled during completion
|
169
|
-
# item insertion. If not provided the
|
161
|
+
# item insertion. If not provided the client's default value depends on
|
170
162
|
# the `textDocument.completion.insertTextMode` client capability.
|
171
163
|
#
|
172
|
-
# @
|
173
|
-
#
|
174
|
-
# @return [InsertTextMode | nil]
|
164
|
+
# @return [InsertTextMode]
|
175
165
|
def insert_text_mode
|
176
166
|
attributes.fetch(:insertTextMode)
|
177
167
|
end
|
178
168
|
|
179
169
|
#
|
180
|
-
# An
|
181
|
-
#
|
182
|
-
#
|
170
|
+
# An edit which is applied to a document when selecting this completion.
|
171
|
+
# When an edit is provided the value of `insertText` is ignored.
|
172
|
+
#
|
173
|
+
# *Note:* The range of the edit must be a single line range and it must
|
174
|
+
# contain the position at which completion has been requested.
|
183
175
|
#
|
184
176
|
# Most editors support two different operations when accepting a completion
|
185
177
|
# item. One is to insert a completion text and the other is to replace an
|
186
178
|
# existing text with a completion text. Since this can usually not be
|
187
179
|
# predetermined by a server it can report both ranges. Clients need to
|
188
|
-
# signal support for `
|
189
|
-
# `textDocument.completion.insertReplaceSupport` client
|
190
|
-
# property.
|
180
|
+
# signal support for `InsertReplaceEdit`s via the
|
181
|
+
# `textDocument.completion.completionItem.insertReplaceSupport` client
|
182
|
+
# capability property.
|
191
183
|
#
|
192
184
|
# *Note 1:* The text edit's range as well as both ranges from an insert
|
193
185
|
# replace edit must be a [single line] and they must contain the position
|
@@ -196,9 +188,7 @@ module LanguageServer
|
|
196
188
|
# must be a prefix of the edit's replace range, that means it must be
|
197
189
|
# contained and starting at the same position.
|
198
190
|
#
|
199
|
-
# @
|
200
|
-
#
|
201
|
-
# @return [TextEdit | InsertReplaceEdit | nil]
|
191
|
+
# @return [TextEdit | InsertReplaceEdit]
|
202
192
|
def text_edit
|
203
193
|
attributes.fetch(:textEdit)
|
204
194
|
end
|
@@ -213,52 +203,51 @@ module LanguageServer
|
|
213
203
|
# If not provided and a list's default range is provided the label
|
214
204
|
# property is used as a text.
|
215
205
|
#
|
216
|
-
# @
|
217
|
-
#
|
218
|
-
# @return [string | nil]
|
206
|
+
# @return [string]
|
219
207
|
def text_edit_text
|
220
208
|
attributes.fetch(:textEditText)
|
221
209
|
end
|
222
210
|
|
223
211
|
#
|
224
|
-
# An optional array of additional
|
225
|
-
# selecting this completion. Edits must not overlap (including the same
|
226
|
-
# with the main
|
212
|
+
# An optional array of additional text edits that are applied when
|
213
|
+
# selecting this completion. Edits must not overlap (including the same
|
214
|
+
# insert position) with the main edit nor with themselves.
|
227
215
|
#
|
228
|
-
# Additional text edits should be used to change text unrelated to the
|
229
|
-
# (for example adding an import statement at the
|
230
|
-
# insert an unqualified type).
|
216
|
+
# Additional text edits should be used to change text unrelated to the
|
217
|
+
# current cursor position (for example adding an import statement at the
|
218
|
+
# top of the file if the completion item will insert an unqualified type).
|
231
219
|
#
|
232
|
-
# @return [TextEdit[]
|
220
|
+
# @return [TextEdit[]]
|
233
221
|
def additional_text_edits
|
234
222
|
attributes.fetch(:additionalTextEdits)
|
235
223
|
end
|
236
224
|
|
237
225
|
#
|
238
|
-
# An optional set of characters that when pressed while this completion is
|
239
|
-
# then type that character. *Note* that all
|
240
|
-
# characters
|
226
|
+
# An optional set of characters that when pressed while this completion is
|
227
|
+
# active will accept it first and then type that character. *Note* that all
|
228
|
+
# commit characters should have `length=1` and that superfluous characters
|
229
|
+
# will be ignored.
|
241
230
|
#
|
242
|
-
# @return [string[]
|
231
|
+
# @return [string[]]
|
243
232
|
def commit_characters
|
244
233
|
attributes.fetch(:commitCharacters)
|
245
234
|
end
|
246
235
|
|
247
236
|
#
|
248
|
-
# An optional
|
249
|
-
# additional modifications to the current document should be
|
250
|
-
#
|
237
|
+
# An optional command that is executed *after* inserting this completion.
|
238
|
+
# *Note* that additional modifications to the current document should be
|
239
|
+
# described with the additionalTextEdits-property.
|
251
240
|
#
|
252
|
-
# @return [Command
|
241
|
+
# @return [Command]
|
253
242
|
def command
|
254
243
|
attributes.fetch(:command)
|
255
244
|
end
|
256
245
|
|
257
246
|
#
|
258
|
-
# A data entry field that is preserved on a completion item between
|
259
|
-
#
|
247
|
+
# A data entry field that is preserved on a completion item between
|
248
|
+
# a completion and a completion resolve request.
|
260
249
|
#
|
261
|
-
# @return [LSPAny
|
250
|
+
# @return [LSPAny]
|
262
251
|
def data
|
263
252
|
attributes.fetch(:data)
|
264
253
|
end
|
@@ -4,8 +4,6 @@ module LanguageServer
|
|
4
4
|
#
|
5
5
|
# Additional details for a completion item label.
|
6
6
|
#
|
7
|
-
# @since 3.17.0
|
8
|
-
#
|
9
7
|
class CompletionItemLabelDetails
|
10
8
|
def initialize(detail: nil, description: nil)
|
11
9
|
@attributes = {}
|
@@ -17,19 +15,21 @@ module LanguageServer
|
|
17
15
|
end
|
18
16
|
|
19
17
|
#
|
20
|
-
# An optional string which is rendered less prominently directly after
|
21
|
-
# without any spacing. Should be
|
18
|
+
# An optional string which is rendered less prominently directly after
|
19
|
+
# {@link CompletionItem.label label}, without any spacing. Should be
|
20
|
+
# used for function signatures or type annotations.
|
22
21
|
#
|
23
|
-
# @return [string
|
22
|
+
# @return [string]
|
24
23
|
def detail
|
25
24
|
attributes.fetch(:detail)
|
26
25
|
end
|
27
26
|
|
28
27
|
#
|
29
|
-
# An optional string which is rendered less prominently after
|
30
|
-
#
|
28
|
+
# An optional string which is rendered less prominently after
|
29
|
+
# {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified
|
30
|
+
# names or file path.
|
31
31
|
#
|
32
|
-
# @return [string
|
32
|
+
# @return [string]
|
33
33
|
def description
|
34
34
|
attributes.fetch(:description)
|
35
35
|
end
|
@@ -2,8 +2,8 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# Represents a collection of [completion items](#CompletionItem) to be
|
6
|
-
# in the editor.
|
5
|
+
# Represents a collection of [completion items](#CompletionItem) to be
|
6
|
+
# presented in the editor.
|
7
7
|
#
|
8
8
|
class CompletionList
|
9
9
|
def initialize(is_incomplete:, item_defaults: nil, items:)
|
@@ -17,7 +17,8 @@ module LanguageServer
|
|
17
17
|
end
|
18
18
|
|
19
19
|
#
|
20
|
-
# This list
|
20
|
+
# This list is not complete. Further typing should result in recomputing
|
21
|
+
# this list.
|
21
22
|
#
|
22
23
|
# Recomputed lists have all their items replaced (not appended) in the
|
23
24
|
# incomplete completion sessions.
|
@@ -40,9 +41,7 @@ module LanguageServer
|
|
40
41
|
# signals support for this via the `completionList.itemDefaults`
|
41
42
|
# capability.
|
42
43
|
#
|
43
|
-
# @
|
44
|
-
#
|
45
|
-
# @return [{ commitCharacters:string[], editRange:Range | { insert:Range, replace:Range }, insertTextFormat:InsertTextFormat, insertTextMode:InsertTextMode, data:LSPAny } | nil]
|
44
|
+
# @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }]
|
46
45
|
def item_defaults
|
47
46
|
attributes.fetch(:itemDefaults)
|
48
47
|
end
|
@@ -5,44 +5,50 @@ module LanguageServer
|
|
5
5
|
# Completion options.
|
6
6
|
#
|
7
7
|
class CompletionOptions
|
8
|
-
def initialize(
|
8
|
+
def initialize(work_done_progress: nil, trigger_characters: nil, all_commit_characters: nil, resolve_provider: nil, completion_item: nil)
|
9
9
|
@attributes = {}
|
10
10
|
|
11
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
11
12
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
12
13
|
@attributes[:allCommitCharacters] = all_commit_characters if all_commit_characters
|
13
14
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
14
15
|
@attributes[:completionItem] = completion_item if completion_item
|
15
|
-
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
16
16
|
|
17
17
|
@attributes.freeze
|
18
18
|
end
|
19
19
|
|
20
|
+
# @return [boolean]
|
21
|
+
def work_done_progress
|
22
|
+
attributes.fetch(:workDoneProgress)
|
23
|
+
end
|
24
|
+
|
20
25
|
#
|
21
|
-
# Most tools trigger completion request automatically without explicitly
|
22
|
-
# it using a keyboard shortcut (e.g. Ctrl+Space). Typically they
|
23
|
-
# starts to type an identifier. For example if the user
|
24
|
-
# code complete will automatically pop up
|
25
|
-
#
|
26
|
+
# Most tools trigger completion request automatically without explicitly
|
27
|
+
# requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they
|
28
|
+
# do so when the user starts to type an identifier. For example if the user
|
29
|
+
# types `c` in a JavaScript file code complete will automatically pop up
|
30
|
+
# present `console` besides others as a completion item. Characters that
|
31
|
+
# make up identifiers don't need to be listed here.
|
26
32
|
#
|
27
|
-
# If code complete should automatically be trigger on characters not being
|
28
|
-
# an identifier (for example `.` in JavaScript) list them in
|
33
|
+
# If code complete should automatically be trigger on characters not being
|
34
|
+
# valid inside an identifier (for example `.` in JavaScript) list them in
|
35
|
+
# `triggerCharacters`.
|
29
36
|
#
|
30
|
-
# @return [string[]
|
37
|
+
# @return [string[]]
|
31
38
|
def trigger_characters
|
32
39
|
attributes.fetch(:triggerCharacters)
|
33
40
|
end
|
34
41
|
|
35
42
|
#
|
36
|
-
# The list of all possible characters that commit a completion. This field
|
37
|
-
# if clients don't support individual commit characters per
|
38
|
-
#
|
43
|
+
# The list of all possible characters that commit a completion. This field
|
44
|
+
# can be used if clients don't support individual commit characters per
|
45
|
+
# completion item. See client capability
|
46
|
+
# `completion.completionItem.commitCharactersSupport`.
|
39
47
|
#
|
40
|
-
# If a server provides both `allCommitCharacters` and commit characters on
|
41
|
-
# completion item the ones on the completion item win.
|
48
|
+
# If a server provides both `allCommitCharacters` and commit characters on
|
49
|
+
# an individual completion item the ones on the completion item win.
|
42
50
|
#
|
43
|
-
# @
|
44
|
-
#
|
45
|
-
# @return [string[] | nil]
|
51
|
+
# @return [string[]]
|
46
52
|
def all_commit_characters
|
47
53
|
attributes.fetch(:allCommitCharacters)
|
48
54
|
end
|
@@ -51,7 +57,7 @@ module LanguageServer
|
|
51
57
|
# The server provides support to resolve additional
|
52
58
|
# information for a completion item.
|
53
59
|
#
|
54
|
-
# @return [boolean
|
60
|
+
# @return [boolean]
|
55
61
|
def resolve_provider
|
56
62
|
attributes.fetch(:resolveProvider)
|
57
63
|
end
|
@@ -60,18 +66,11 @@ module LanguageServer
|
|
60
66
|
# The server supports the following `CompletionItem` specific
|
61
67
|
# capabilities.
|
62
68
|
#
|
63
|
-
# @
|
64
|
-
#
|
65
|
-
# @return [{ labelDetailsSupport:boolean } | nil]
|
69
|
+
# @return [{ labelDetailsSupport?: boolean; }]
|
66
70
|
def completion_item
|
67
71
|
attributes.fetch(:completionItem)
|
68
72
|
end
|
69
73
|
|
70
|
-
# @return [boolean | nil]
|
71
|
-
def work_done_progress
|
72
|
-
attributes.fetch(:workDoneProgress)
|
73
|
-
end
|
74
|
-
|
75
74
|
attr_reader :attributes
|
76
75
|
|
77
76
|
def to_hash
|
@@ -1,31 +1,19 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Completion parameters
|
6
|
-
#
|
7
4
|
class CompletionParams
|
8
|
-
def initialize(
|
5
|
+
def initialize(text_document:, position:, work_done_token: nil, partial_result_token: nil, context: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
|
-
@attributes[:context] = context if context
|
12
8
|
@attributes[:textDocument] = text_document
|
13
9
|
@attributes[:position] = position
|
14
10
|
@attributes[:workDoneToken] = work_done_token if work_done_token
|
15
11
|
@attributes[:partialResultToken] = partial_result_token if partial_result_token
|
12
|
+
@attributes[:context] = context if context
|
16
13
|
|
17
14
|
@attributes.freeze
|
18
15
|
end
|
19
16
|
|
20
|
-
#
|
21
|
-
# The completion context. This is only available it the client specifies
|
22
|
-
# to send this using the client capability `textDocument.completion.contextSupport === true`
|
23
|
-
#
|
24
|
-
# @return [CompletionContext | nil]
|
25
|
-
def context
|
26
|
-
attributes.fetch(:context)
|
27
|
-
end
|
28
|
-
|
29
17
|
#
|
30
18
|
# The text document.
|
31
19
|
#
|
@@ -45,20 +33,30 @@ module LanguageServer
|
|
45
33
|
#
|
46
34
|
# An optional token that a server can use to report work done progress.
|
47
35
|
#
|
48
|
-
# @return [ProgressToken
|
36
|
+
# @return [ProgressToken]
|
49
37
|
def work_done_token
|
50
38
|
attributes.fetch(:workDoneToken)
|
51
39
|
end
|
52
40
|
|
53
41
|
#
|
54
|
-
# An optional token that a server can use to report partial results (e.g.
|
55
|
-
# the client.
|
42
|
+
# An optional token that a server can use to report partial results (e.g.
|
43
|
+
# streaming) to the client.
|
56
44
|
#
|
57
|
-
# @return [ProgressToken
|
45
|
+
# @return [ProgressToken]
|
58
46
|
def partial_result_token
|
59
47
|
attributes.fetch(:partialResultToken)
|
60
48
|
end
|
61
49
|
|
50
|
+
#
|
51
|
+
# The completion context. This is only available if the client specifies
|
52
|
+
# to send this using the client capability
|
53
|
+
# `completion.contextSupport === true`
|
54
|
+
#
|
55
|
+
# @return [CompletionContext]
|
56
|
+
def context
|
57
|
+
attributes.fetch(:context)
|
58
|
+
end
|
59
|
+
|
62
60
|
attr_reader :attributes
|
63
61
|
|
64
62
|
def to_hash
|
@@ -1,58 +1,61 @@
|
|
1
1
|
module LanguageServer
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
|
-
#
|
5
|
-
# Registration options for a [CompletionRequest](#CompletionRequest).
|
6
|
-
#
|
7
4
|
class CompletionRegistrationOptions
|
8
|
-
def initialize(document_selector:,
|
5
|
+
def initialize(document_selector:, work_done_progress: nil, trigger_characters: nil, all_commit_characters: nil, resolve_provider: nil, completion_item: nil)
|
9
6
|
@attributes = {}
|
10
7
|
|
11
8
|
@attributes[:documentSelector] = document_selector
|
9
|
+
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
12
10
|
@attributes[:triggerCharacters] = trigger_characters if trigger_characters
|
13
11
|
@attributes[:allCommitCharacters] = all_commit_characters if all_commit_characters
|
14
12
|
@attributes[:resolveProvider] = resolve_provider if resolve_provider
|
15
13
|
@attributes[:completionItem] = completion_item if completion_item
|
16
|
-
@attributes[:workDoneProgress] = work_done_progress if work_done_progress
|
17
14
|
|
18
15
|
@attributes.freeze
|
19
16
|
end
|
20
17
|
|
21
18
|
#
|
22
|
-
# A document selector to identify the scope of the registration. If set to
|
23
|
-
# the document selector provided on the client side will be used.
|
19
|
+
# A document selector to identify the scope of the registration. If set to
|
20
|
+
# null the document selector provided on the client side will be used.
|
24
21
|
#
|
25
|
-
# @return [DocumentSelector
|
22
|
+
# @return [DocumentSelector]
|
26
23
|
def document_selector
|
27
24
|
attributes.fetch(:documentSelector)
|
28
25
|
end
|
29
26
|
|
27
|
+
# @return [boolean]
|
28
|
+
def work_done_progress
|
29
|
+
attributes.fetch(:workDoneProgress)
|
30
|
+
end
|
31
|
+
|
30
32
|
#
|
31
|
-
# Most tools trigger completion request automatically without explicitly
|
32
|
-
# it using a keyboard shortcut (e.g. Ctrl+Space). Typically they
|
33
|
-
# starts to type an identifier. For example if the user
|
34
|
-
# code complete will automatically pop up
|
35
|
-
#
|
33
|
+
# Most tools trigger completion request automatically without explicitly
|
34
|
+
# requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they
|
35
|
+
# do so when the user starts to type an identifier. For example if the user
|
36
|
+
# types `c` in a JavaScript file code complete will automatically pop up
|
37
|
+
# present `console` besides others as a completion item. Characters that
|
38
|
+
# make up identifiers don't need to be listed here.
|
36
39
|
#
|
37
|
-
# If code complete should automatically be trigger on characters not being
|
38
|
-
# an identifier (for example `.` in JavaScript) list them in
|
40
|
+
# If code complete should automatically be trigger on characters not being
|
41
|
+
# valid inside an identifier (for example `.` in JavaScript) list them in
|
42
|
+
# `triggerCharacters`.
|
39
43
|
#
|
40
|
-
# @return [string[]
|
44
|
+
# @return [string[]]
|
41
45
|
def trigger_characters
|
42
46
|
attributes.fetch(:triggerCharacters)
|
43
47
|
end
|
44
48
|
|
45
49
|
#
|
46
|
-
# The list of all possible characters that commit a completion. This field
|
47
|
-
# if clients don't support individual commit characters per
|
48
|
-
#
|
50
|
+
# The list of all possible characters that commit a completion. This field
|
51
|
+
# can be used if clients don't support individual commit characters per
|
52
|
+
# completion item. See client capability
|
53
|
+
# `completion.completionItem.commitCharactersSupport`.
|
49
54
|
#
|
50
|
-
# If a server provides both `allCommitCharacters` and commit characters on
|
51
|
-
# completion item the ones on the completion item win.
|
55
|
+
# If a server provides both `allCommitCharacters` and commit characters on
|
56
|
+
# an individual completion item the ones on the completion item win.
|
52
57
|
#
|
53
|
-
# @
|
54
|
-
#
|
55
|
-
# @return [string[] | nil]
|
58
|
+
# @return [string[]]
|
56
59
|
def all_commit_characters
|
57
60
|
attributes.fetch(:allCommitCharacters)
|
58
61
|
end
|
@@ -61,7 +64,7 @@ module LanguageServer
|
|
61
64
|
# The server provides support to resolve additional
|
62
65
|
# information for a completion item.
|
63
66
|
#
|
64
|
-
# @return [boolean
|
67
|
+
# @return [boolean]
|
65
68
|
def resolve_provider
|
66
69
|
attributes.fetch(:resolveProvider)
|
67
70
|
end
|
@@ -70,18 +73,11 @@ module LanguageServer
|
|
70
73
|
# The server supports the following `CompletionItem` specific
|
71
74
|
# capabilities.
|
72
75
|
#
|
73
|
-
# @
|
74
|
-
#
|
75
|
-
# @return [{ labelDetailsSupport:boolean } | nil]
|
76
|
+
# @return [{ labelDetailsSupport?: boolean; }]
|
76
77
|
def completion_item
|
77
78
|
attributes.fetch(:completionItem)
|
78
79
|
end
|
79
80
|
|
80
|
-
# @return [boolean | nil]
|
81
|
-
def work_done_progress
|
82
|
-
attributes.fetch(:workDoneProgress)
|
83
|
-
end
|
84
|
-
|
85
81
|
attr_reader :attributes
|
86
82
|
|
87
83
|
def to_hash
|
@@ -14,7 +14,7 @@ module LanguageServer
|
|
14
14
|
#
|
15
15
|
# The scope to get the configuration section for.
|
16
16
|
#
|
17
|
-
# @return [string
|
17
|
+
# @return [string]
|
18
18
|
def scope_uri
|
19
19
|
attributes.fetch(:scopeUri)
|
20
20
|
end
|
@@ -22,7 +22,7 @@ module LanguageServer
|
|
22
22
|
#
|
23
23
|
# The configuration section asked for.
|
24
24
|
#
|
25
|
-
# @return [string
|
25
|
+
# @return [string]
|
26
26
|
def section
|
27
27
|
attributes.fetch(:section)
|
28
28
|
end
|
@@ -2,7 +2,7 @@ module LanguageServer
|
|
2
2
|
module Protocol
|
3
3
|
module Interface
|
4
4
|
#
|
5
|
-
# Create file operation
|
5
|
+
# Create file operation
|
6
6
|
#
|
7
7
|
class CreateFile
|
8
8
|
def initialize(kind:, uri:, options: nil, annotation_id: nil)
|
@@ -27,7 +27,7 @@ module LanguageServer
|
|
27
27
|
#
|
28
28
|
# The resource to create.
|
29
29
|
#
|
30
|
-
# @return [
|
30
|
+
# @return [string]
|
31
31
|
def uri
|
32
32
|
attributes.fetch(:uri)
|
33
33
|
end
|
@@ -35,7 +35,7 @@ module LanguageServer
|
|
35
35
|
#
|
36
36
|
# Additional options
|
37
37
|
#
|
38
|
-
# @return [CreateFileOptions
|
38
|
+
# @return [CreateFileOptions]
|
39
39
|
def options
|
40
40
|
attributes.fetch(:options)
|
41
41
|
end
|
@@ -43,9 +43,7 @@ module LanguageServer
|
|
43
43
|
#
|
44
44
|
# An optional annotation identifier describing the operation.
|
45
45
|
#
|
46
|
-
# @
|
47
|
-
#
|
48
|
-
# @return [ChangeAnnotationIdentifier | nil]
|
46
|
+
# @return [string]
|
49
47
|
def annotation_id
|
50
48
|
attributes.fetch(:annotationId)
|
51
49
|
end
|