diff --git a/Gemfile b/Gemfile index 69d4fd559..eb4a5c6b1 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem "irb" gem "rubocop-shopify" gem "rubocop-sorbet", ">= 0.4.1" gem "rubocop-rspec" # useful even though we use minitest/spec -gem "ruby-lsp", ">= 0.19.1" +gem "ruby-lsp", ">= 0.22.1" gem "ruby-lsp-rails", ">= 0.3.18" group :deployment, :development do diff --git a/Gemfile.lock b/Gemfile.lock index cb281e245..7ad925e3b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -306,13 +306,13 @@ GEM rubocop (~> 1.51) rubocop-sorbet (0.8.7) rubocop (>= 1) - ruby-lsp (0.19.1) + ruby-lsp (0.22.1) language_server-protocol (~> 3.17.0) - prism (>= 1.1, < 2.0) + prism (>= 1.2, < 2.0) rbs (>= 3, < 4) sorbet-runtime (>= 0.5.10782) - ruby-lsp-rails (0.3.18) - ruby-lsp (>= 0.19.0, < 0.20.0) + ruby-lsp-rails (0.3.27) + ruby-lsp (>= 0.22.0, < 0.23.0) ruby-progressbar (1.13.0) securerandom (0.3.1) shopify-money (3.0.0) @@ -396,7 +396,7 @@ DEPENDENCIES rubocop-rspec rubocop-shopify rubocop-sorbet (>= 0.4.1) - ruby-lsp (>= 0.19.1) + ruby-lsp (>= 0.22.1) ruby-lsp-rails (>= 0.3.18) shopify-money sidekiq diff --git a/lib/ruby_lsp/tapioca/addon.rb b/lib/ruby_lsp/tapioca/addon.rb index 364b3fbcf..3375af6d1 100644 --- a/lib/ruby_lsp/tapioca/addon.rb +++ b/lib/ruby_lsp/tapioca/addon.rb @@ -1,7 +1,7 @@ # typed: strict # frozen_string_literal: true -RubyLsp::Addon.depend_on_ruby_lsp!(">= 0.20", "< 0.22") +RubyLsp::Addon.depend_on_ruby_lsp!(">= 0.22.1", "< 0.23") begin # The Tapioca add-on depends on the Rails add-on to add a runtime component to the runtime server. We can allow the @@ -32,8 +32,7 @@ def initialize sig { override.params(global_state: RubyLsp::GlobalState, outgoing_queue: Thread::Queue).void } def activate(global_state, outgoing_queue) @global_state = global_state - # TODO: Uncomment - # return unless @global_state.experimental_features + return unless @global_state.enabled_feature?(:tapioca_addon) @index = @global_state.index Thread.new do @@ -67,7 +66,7 @@ def version sig { params(changes: T::Array[{ uri: String, type: Integer }]).void } def workspace_did_change_watched_files(changes) # TODO: Uncomment - # return unless T.must(@global_state).experimental_features + return unless T.must(@global_state).enabled_feature?(:tapioca_addon) return unless @rails_runner_client # Client is not ready constants = changes.flat_map do |change| diff --git a/sorbet/rbi/gems/ruby-lsp-rails@0.3.18.rbi b/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi similarity index 84% rename from sorbet/rbi/gems/ruby-lsp-rails@0.3.18.rbi rename to sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi index fd7262ecc..c4f7c4a95 100644 --- a/sorbet/rbi/gems/ruby-lsp-rails@0.3.18.rbi +++ b/sorbet/rbi/gems/ruby-lsp-rails@0.3.27.rbi @@ -27,17 +27,17 @@ end # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#20 class RubyLsp::Rails::Addon < ::RubyLsp::Addon - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#24 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#26 sig { void } def initialize; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#50 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#53 sig { override.params(global_state: ::RubyLsp::GlobalState, outgoing_queue: ::Thread::Queue).void } def activate(global_state, outgoing_queue); end # Creates a new CodeLens listener. This method is invoked on every CodeLens request # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#80 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#82 sig do override .params( @@ -48,7 +48,7 @@ class RubyLsp::Rails::Addon < ::RubyLsp::Addon end def create_code_lens_listener(response_builder, uri, dispatcher); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#115 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#117 sig do override .params( @@ -60,7 +60,7 @@ class RubyLsp::Rails::Addon < ::RubyLsp::Addon end def create_definition_listener(response_builder, uri, node_context, dispatcher); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#101 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#103 sig do override .params( @@ -70,7 +70,7 @@ class RubyLsp::Rails::Addon < ::RubyLsp::Addon end def create_document_symbol_listener(response_builder, dispatcher); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#91 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#93 sig do override .params( @@ -81,31 +81,56 @@ class RubyLsp::Rails::Addon < ::RubyLsp::Addon end def create_hover_listener(response_builder, node_context, dispatcher); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#63 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#65 sig { override.void } def deactivate; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#156 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#142 + sig { override.params(title: ::String).void } + def handle_window_show_message_response(title); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#137 sig { override.returns(::String) } def name; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#45 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#48 sig { returns(::RubyLsp::Rails::RunnerClient) } def rails_runner_client; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#130 - sig { params(global_state: ::RubyLsp::GlobalState, outgoing_queue: ::Thread::Queue).void } - def register_additional_file_watchers(global_state:, outgoing_queue:); end - - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#68 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#70 sig { override.returns(::String) } def version; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#121 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#123 sig { params(changes: T::Array[{uri: ::String, type: ::Integer}]).void } def workspace_did_change_watched_files(changes); end + + private + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#169 + sig { params(id: ::String, title: ::String, percentage: T.nilable(::Integer), message: T.nilable(::String)).void } + def begin_progress(id, title, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#194 + sig { params(id: ::String).void } + def end_progress(id); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#227 + sig { void } + def offer_to_run_pending_migrations; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#201 + sig { params(global_state: ::RubyLsp::GlobalState, outgoing_queue: ::Thread::Queue).void } + def register_additional_file_watchers(global_state:, outgoing_queue:); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#187 + sig { params(id: ::String, percentage: T.nilable(::Integer), message: T.nilable(::String)).void } + def report_progress(id, percentage: T.unsafe(nil), message: T.unsafe(nil)); end end +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/addon.rb#23 +RubyLsp::Rails::Addon::RUN_MIGRATIONS_TITLE = T.let(T.unsafe(nil), String) + # ![CodeLens demo](../../code_lens.gif) # # This feature adds Code Lens features for Rails applications. @@ -252,17 +277,40 @@ class RubyLsp::Rails::CodeLens def test_command; end end -# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#11 +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#12 module RubyLsp::Rails::Common - # Log a debug message to the editor's output + # Log a message to the editor's output panel # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#19 - def debug_message(message); end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#20 + def log_message(message); end + + # Sends an error result to a request, if the request failed. DO NOT INVOKE THIS METHOD FOR NOTIFICATIONS! Use + # `log_message` instead, otherwise the client/server communication will go out of sync + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#26 + def send_error_response(message); end # Write a message to the client. Can be used for sending notifications to the editor # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#13 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#14 def send_message(message); end + + # Sends a result back to the client + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#31 + def send_result(result); end + + # Handle possible errors for a notification. This should only be used for notifications, which means messages that + # do not return a response back to the client. Errors are logged to the editor's output panel + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#50 + def with_notification_error_handling(notification_name, &block); end + + # Handle possible errors for a request. This should only be used for requests, which means messages that return a + # response back to the client. Errors are returned as an error object back to the client + # + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#37 + def with_request_error_handling(request_name, &block); end end # ![Definition demo](../../definition.gif) @@ -447,74 +495,69 @@ class RubyLsp::Rails::Hover private + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#83 + sig { params(default_value: ::String, type: ::String).returns(::String) } + def format_default(default_value, type); end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/hover.rb#58 sig { params(name: ::String).void } def generate_column_content(name); end end # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#6 -class RubyLsp::Rails::IndexingEnhancement - include ::RubyIndexer::Enhancement +class RubyLsp::Rails::IndexingEnhancement < ::RubyIndexer::Enhancement + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#14 + sig { override.params(call_node: ::Prism::CallNode).void } + def on_call_node_enter(call_node); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#18 - sig do - override - .params( - index: ::RubyIndexer::Index, - owner: T.nilable(::RubyIndexer::Entry::Namespace), - node: ::Prism::CallNode, - file_path: ::String - ).void - end - def on_call_node(index, owner, node, file_path); end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#34 + sig { override.params(call_node: ::Prism::CallNode).void } + def on_call_node_leave(call_node); end private - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#41 - sig do - params( - index: ::RubyIndexer::Index, - owner: ::RubyIndexer::Entry::Namespace, - node: ::Prism::CallNode, - file_path: ::String - ).void - end - def handle_association(index, owner, node, file_path); end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#48 + sig { params(owner: ::RubyIndexer::Entry::Namespace, call_node: ::Prism::CallNode).void } + def handle_association(owner, call_node); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#102 + sig { params(owner: ::RubyIndexer::Entry::Namespace, call_node: ::Prism::CallNode).void } + def handle_class_methods(owner, call_node); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#90 - sig { params(index: ::RubyIndexer::Index, owner: ::RubyIndexer::Entry::Namespace, node: ::Prism::CallNode).void } - def handle_concern_extend(index, owner, node); end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb#77 + sig { params(owner: ::RubyIndexer::Entry::Namespace, call_node: ::Prism::CallNode).void } + def handle_concern_extend(owner, call_node); end end -# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#316 +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#341 class RubyLsp::Rails::NullClient < ::RubyLsp::Rails::RunnerClient - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#320 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#345 sig { void } def initialize; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#334 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#359 sig { override.returns(::String) } def rails_root; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#324 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#349 sig { override.void } def shutdown; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#329 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#354 sig { override.returns(T::Boolean) } def stopped?; end private - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#341 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#366 sig { params(message: ::String, type: ::Integer).void } def log_message(message, type: T.unsafe(nil)); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#351 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#376 sig { override.returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def read_response; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#346 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#371 sig { override.params(request: ::String, params: T.untyped).void } def send_message(request, **params); end end @@ -524,23 +567,23 @@ class RubyLsp::Rails::Railtie < ::Rails::Railtie; end # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#9 class RubyLsp::Rails::RunnerClient - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#57 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#55 sig { params(outgoing_queue: ::Thread::Queue).void } def initialize(outgoing_queue); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#150 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#143 sig { params(model_name: ::String, association_name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def association_target_location(model_name:, association_name:); end # Delegates a notification to a server add-on # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#188 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#181 sig { params(server_addon_name: ::String, request_name: ::String, params: T.untyped).void } def delegate_notification(server_addon_name:, request_name:, **params); end # Delegates a request to a server add-on # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#205 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#221 sig do params( server_addon_name: ::String, @@ -550,63 +593,75 @@ class RubyLsp::Rails::RunnerClient end def delegate_request(server_addon_name:, request_name:, **params); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#250 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#266 sig { params(request: ::String, params: T.untyped).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def make_request(request, **params); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#134 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#127 sig { params(name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def model(name); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#54 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#191 + sig { returns(T.nilable(::String)) } + def pending_migrations_message; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#52 sig { returns(::String) } def rails_root; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#123 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#116 sig { params(server_addon_path: ::String).void } def register_server_addon(server_addon_path); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#176 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#169 sig { params(controller: ::String, action: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def route(controller:, action:); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#165 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#158 sig { params(name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def route_location(name); end + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#203 + sig { returns(T.nilable(T::Hash[::Symbol, T.untyped])) } + def run_migrations; end + # Notifications are like messages, but one-way, with no response sent back. # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#257 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#273 sig { params(request: ::String, params: T.untyped).void } def send_notification(request, **params); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#229 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#245 sig { void } def shutdown; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#240 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#256 sig { returns(T::Boolean) } def stopped?; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#217 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#233 sig { void } def trigger_reload; end private - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#303 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#317 sig { void } def force_kill; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#309 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#323 sig { params(message: ::String, type: ::Integer).void } def log_message(message, type: T.unsafe(nil)); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#275 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#330 + sig { returns(T.nilable(::Integer)) } + def read_content_length; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#291 sig { overridable.returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def read_response; end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#262 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#278 sig { overridable.params(request: ::String, params: T.untyped).void } def send_message(request, **params); end @@ -618,86 +673,92 @@ class RubyLsp::Rails::RunnerClient end # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#47 -class RubyLsp::Rails::RunnerClient::EmptyMessageError < ::StandardError; end - -# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#46 -class RubyLsp::Rails::RunnerClient::IncompleteMessageError < ::StandardError; end +class RubyLsp::Rails::RunnerClient::EmptyMessageError < ::RubyLsp::Rails::RunnerClient::MessageError; end # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#45 class RubyLsp::Rails::RunnerClient::InitializationError < ::StandardError; end -# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#49 -RubyLsp::Rails::RunnerClient::MAX_RETRIES = T.let(T.unsafe(nil), Integer) +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb#46 +class RubyLsp::Rails::RunnerClient::MessageError < ::StandardError; end -# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#65 +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#103 class RubyLsp::Rails::Server include ::RubyLsp::Rails::Common # @return [Server] a new instance of Server # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#68 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#106 def initialize(stdout: T.unsafe(nil), override_default_output_device: T.unsafe(nil)); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#104 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#139 def execute(request, params); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#88 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#126 def start; end private # @return [Boolean] # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#234 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#267 def active_record_model?(const); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#211 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#298 + def load_routes; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#277 + def pending_migrations_message; end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#255 def resolve_association_target(params); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#186 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#239 def resolve_database_info_from_model(model_name); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#132 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#188 def resolve_route_info(requirements); end - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#181 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#234 def route_location(name); end + + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#287 + def run_migrations; end end -# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#24 +# source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#62 class RubyLsp::Rails::ServerAddon include ::RubyLsp::Rails::Common # @return [ServerAddon] a new instance of ServerAddon # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#52 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#90 def initialize(stdout); end # @raise [NotImplementedError] # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#60 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#98 def execute(request, params); end # @raise [NotImplementedError] # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#56 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#94 def name; end class << self # Delegate `request` with `params` to the server add-on with the given `name` # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#39 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#77 def delegate(name, request, params); end # Instantiate all server addons and store them in a hash for easy access after we have discovered the classes # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#44 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#82 def finalize_registrations!(stdout); end # We keep track of runtime server add-ons the same way we track other add-ons, by storing classes that inherit # from the base one # - # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#33 + # source://ruby-lsp-rails/lib/ruby_lsp/ruby_lsp_rails/server.rb#71 def inherited(child); end end end diff --git a/sorbet/rbi/gems/ruby-lsp@0.19.1.rbi b/sorbet/rbi/gems/ruby-lsp@0.22.1.rbi similarity index 86% rename from sorbet/rbi/gems/ruby-lsp@0.19.1.rbi rename to sorbet/rbi/gems/ruby-lsp@0.22.1.rbi index 60705171c..434d48dc9 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.19.1.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.22.1.rbi @@ -14,7 +14,7 @@ class RubyIndexer::Configuration sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#172 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#229 sig { params(config: T::Hash[::String, T.untyped]).void } def apply_config(config); end @@ -27,27 +27,31 @@ class RubyIndexer::Configuration # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#23 def encoding=(_arg0); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#60 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#85 sig { returns(T::Array[::RubyIndexer::IndexablePath]) } def indexables; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#167 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#224 sig { returns(::Regexp) } def magic_comment_regex; end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#70 + sig { returns(::String) } + def merged_excluded_file_pattern; end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#20 sig { params(workspace_path: ::String).void } def workspace_path=(workspace_path); end private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#200 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#257 sig { returns(T::Array[::String]) } def initial_excluded_gems; end # @raise [ArgumentError] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#185 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#242 sig { params(config: T::Hash[::String, T.untyped]).void } def validate_config!(config); end end @@ -57,130 +61,196 @@ RubyIndexer::Configuration::CONFIGURATION_SCHEMA = T.let(T.unsafe(nil), Hash) # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#5 class RubyIndexer::DeclarationListener - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#24 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#23 sig do params( index: ::RubyIndexer::Index, dispatcher: ::Prism::Dispatcher, parse_result: ::Prism::ParseResult, file_path: ::String, - collect_comments: T::Boolean, - enhancements: T::Array[::RubyIndexer::Enhancement] + collect_comments: T::Boolean + ).void + end + def initialize(index, dispatcher, parse_result, file_path, collect_comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#493 + sig do + params( + name_or_nesting: T.any(::String, T::Array[::String]), + full_location: ::Prism::Location, + name_location: ::Prism::Location, + parent_class_name: T.nilable(::String), + comments: T.nilable(::String) + ).void + end + def add_class(name_or_nesting, full_location, name_location, parent_class_name: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#446 + sig do + params( + name: ::String, + node_location: ::Prism::Location, + signatures: T::Array[::RubyIndexer::Entry::Signature], + visibility: ::RubyIndexer::Entry::Visibility, + comments: T.nilable(::String) + ).void + end + def add_method(name, node_location, signatures, visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#469 + sig do + params( + name: ::String, + full_location: ::Prism::Location, + name_location: ::Prism::Location, + comments: T.nilable(::String) ).void end - def initialize(index, dispatcher, parse_result, file_path, collect_comments: T.unsafe(nil), enhancements: T.unsafe(nil)); end + def add_module(name, full_location, name_location, comments: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#525 + sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } + def current_owner; end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#12 sig { returns(T::Array[::String]) } def indexing_errors; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#411 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#422 sig { params(node: ::Prism::AliasMethodNode).void } def on_alias_method_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#288 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#261 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#320 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#300 sig { params(node: ::Prism::CallNode).void } def on_call_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#78 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#87 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#122 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#119 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#276 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#249 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#282 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#255 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#270 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#243 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#254 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#227 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#244 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#217 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#234 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#207 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#224 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#197 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#264 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#237 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#333 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#321 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#376 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#362 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#391 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#372 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#377 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#382 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#387 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#392 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#402 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#396 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#407 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#401 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#412 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#406 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#417 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#386 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#397 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#129 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#124 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#151 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#130 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#204 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#177 sig { params(node: ::Prism::MultiWriteNode).void } def on_multi_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#158 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#135 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#197 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#172 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#518 + sig { void } + def pop_namespace_stack; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#508 + sig { params(block: T.proc.params(index: ::RubyIndexer::Index, base: ::RubyIndexer::Entry::Namespace).void).void } + def register_included_hook(&block); end + private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#798 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1013 sig { params(name: ::String).returns(T::Array[::String]) } def actual_nesting(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#546 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#670 sig do params( node: T.any(::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantTargetNode, ::Prism::ConstantWriteNode), @@ -190,27 +260,44 @@ class RubyIndexer::DeclarationListener end def add_constant(node, name, value = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#595 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#1027 + sig { params(short_name: ::String, entry: ::RubyIndexer::Entry::Namespace).void } + def advance_namespace_stack(short_name, entry); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#721 sig { params(node: ::Prism::Node).returns(T.nilable(::String)) } def collect_comments(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#706 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#749 + sig { params(line: ::Integer).returns(T::Boolean) } + def comment_exists_at?(line); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#921 sig { returns(::RubyIndexer::Entry::Visibility) } def current_visibility; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#624 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#754 sig { params(name: ::String).returns(::String) } def fully_qualify_name(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#489 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#614 sig { params(node: ::Prism::CallNode).void } def handle_alias_method(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#633 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#763 sig { params(node: ::Prism::CallNode, reader: T::Boolean, writer: T::Boolean).void } def handle_attribute(node, reader:, writer:); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#441 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#543 + sig do + params( + node: T.any(::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableTargetNode, ::Prism::GlobalVariableWriteNode), + loc: ::Prism::Location + ).void + end + def handle_global_variable(node, loc); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#567 sig do params( node: T.any(::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableTargetNode, ::Prism::InstanceVariableWriteNode), @@ -219,15 +306,23 @@ class RubyIndexer::DeclarationListener end def handle_instance_variable(node, loc); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#678 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#840 + sig { params(node: ::Prism::CallNode).void } + def handle_module_function(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#806 sig { params(node: ::Prism::CallNode, operation: ::Symbol).void } def handle_module_operation(node, operation); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#464 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#882 + sig { params(node: ::Prism::CallNode).void } + def handle_private_class_method(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#589 sig { params(node: ::Prism::CallNode).void } def handle_private_constant(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#711 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#926 sig do params( parameters_node: T.nilable(::Prism::ParametersNode) @@ -235,7 +330,7 @@ class RubyIndexer::DeclarationListener end def list_params(parameters_node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#773 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#988 sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::Symbol)) } def parameter_name(node); end end @@ -246,52 +341,63 @@ RubyIndexer::DeclarationListener::BASIC_OBJECT_NESTING = T.let(T.unsafe(nil), Ar # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#8 RubyIndexer::DeclarationListener::OBJECT_NESTING = T.let(T.unsafe(nil), Array) -# @abstract Subclasses must implement the `abstract` methods below. +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#5 -module RubyIndexer::Enhancement - requires_ancestor { Object } +class RubyIndexer::Enhancement + abstract! - interface! + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#35 + sig { params(listener: ::RubyIndexer::DeclarationListener).void } + def initialize(listener); end # The `on_extend` indexing enhancement is invoked whenever an extend is encountered in the code. It can be used to # register for an included callback, similar to what `ActiveSupport::Concern` does in order to auto-extend the # `ClassMethods` modules # - # @abstract - # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#24 - sig do - abstract - .params( - index: ::RubyIndexer::Index, - owner: T.nilable(::RubyIndexer::Entry::Namespace), - node: ::Prism::CallNode, - file_path: ::String - ).void + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#43 + sig { overridable.params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#46 + sig { overridable.params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#23 + sig { params(listener: ::RubyIndexer::DeclarationListener).returns(T::Array[::RubyIndexer::Enhancement]) } + def all(listener); end + + # Only available for testing purposes + # + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#29 + sig { void } + def clear; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#17 + sig { params(child: T::Class[::RubyIndexer::Enhancement]).void } + def inherited(child); end end - def on_call_node(index, owner, node, file_path); end end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#5 class RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#39 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#38 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(name, file_path, location, comments, encoding); end + def initialize(name, file_path, location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#81 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#67 sig { returns(::String) } def comments; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#76 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#62 sig { returns(::String) } def file_name; end @@ -309,18 +415,18 @@ class RubyIndexer::Entry # @return [RubyIndexer::Location] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def name_location(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#71 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#57 sig { returns(T::Boolean) } def private?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#66 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#52 sig { returns(T::Boolean) } def protected?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#61 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#47 sig { returns(T::Boolean) } def public?; end @@ -334,286 +440,274 @@ class RubyIndexer::Entry def visibility=(_arg0); end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#414 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#373 class RubyIndexer::Entry::Accessor < ::RubyIndexer::Entry::Member - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#418 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#377 sig { override.returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end end # A block method parameter, e.g. `def foo(&block)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#335 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#295 class RubyIndexer::Entry::BlockParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#347 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#307 sig { override.returns(::Symbol) } def decorated_name; end class << self - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#341 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#301 sig { returns(::RubyIndexer::Entry::BlockParameter) } def anonymous; end end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#336 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#296 RubyIndexer::Entry::BlockParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#205 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#178 class RubyIndexer::Entry::Class < ::RubyIndexer::Entry::Namespace - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#224 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#196 sig do params( nesting: T::Array[::String], file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - name_location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, parent_class: T.nilable(::String) ).void end - def initialize(nesting, file_path, location, name_location, comments, encoding, parent_class); end + def initialize(nesting, file_path, location, name_location, comments, parent_class); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#230 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#202 sig { override.returns(::Integer) } def ancestor_hash; end # The unresolved name of the parent class. This may return `nil`, which indicates the lack of an explicit parent # and therefore ::Object is the correct parent class # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#211 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#184 sig { returns(T.nilable(::String)) } def parent_class; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#264 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#224 class RubyIndexer::Entry::Constant < ::RubyIndexer::Entry; end # Alias represents a resolved alias, which points to an existing constant target # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#511 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#456 class RubyIndexer::Entry::ConstantAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#518 - sig do - params( - target: ::String, - unresolved_alias: ::RubyIndexer::Entry::UnresolvedConstantAlias, - encoding: ::Encoding - ).void - end - def initialize(target, unresolved_alias, encoding); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#463 + sig { params(target: ::String, unresolved_alias: ::RubyIndexer::Entry::UnresolvedConstantAlias).void } + def initialize(target, unresolved_alias); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#515 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#460 sig { returns(::String) } def target; end end # A forwarding method parameter, e.g. `def foo(...)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#353 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#313 class RubyIndexer::Entry::ForwardingParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#357 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#317 sig { void } def initialize; end end # Represents a global variable e.g.: $DEBUG # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#533 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#477 class RubyIndexer::Entry::GlobalVariable < ::RubyIndexer::Entry; end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#135 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#121 class RubyIndexer::Entry::Include < ::RubyIndexer::Entry::ModuleOperation; end # Represents an instance variable e.g.: @a = 1 # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#536 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#480 class RubyIndexer::Entry::InstanceVariable < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#550 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#493 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, owner: T.nilable(::RubyIndexer::Entry::Namespace) ).void end - def initialize(name, file_path, location, comments, encoding, owner); end + def initialize(name, file_path, location, comments, owner); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#538 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#482 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end end # An required keyword method parameter, e.g. `def foo(a:)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#299 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#259 class RubyIndexer::Entry::KeywordParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#301 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#261 sig { override.returns(::Symbol) } def decorated_name; end end # A keyword rest method parameter, e.g. `def foo(**a)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#325 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#285 class RubyIndexer::Entry::KeywordRestParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#329 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#289 sig { override.returns(::Symbol) } def decorated_name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#326 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#286 RubyIndexer::Entry::KeywordRestParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#363 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#323 class RubyIndexer::Entry::Member < ::RubyIndexer::Entry abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#383 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#342 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, visibility: ::RubyIndexer::Entry::Visibility, owner: T.nilable(::RubyIndexer::Entry::Namespace) ).void end - def initialize(name, file_path, location, comments, encoding, visibility, owner); end + def initialize(name, file_path, location, comments, visibility, owner); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#393 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#352 sig { returns(::String) } def decorated_parameters; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#401 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#360 sig { returns(::String) } def formatted_signatures; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#370 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#330 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end # @abstract # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#390 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#349 sig { abstract.returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#430 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#389 class RubyIndexer::Entry::Method < ::RubyIndexer::Entry::Member - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#453 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#411 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - name_location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, signatures: T::Array[::RubyIndexer::Entry::Signature], visibility: ::RubyIndexer::Entry::Visibility, owner: T.nilable(::RubyIndexer::Entry::Namespace) ).void end - def initialize(name, file_path, location, name_location, comments, encoding, signatures, visibility, owner); end + def initialize(name, file_path, location, name_location, comments, signatures, visibility, owner); end # Returns the location of the method name, excluding parameters or the body # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#438 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#397 sig { returns(::RubyIndexer::Location) } def name_location; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#434 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#393 sig { override.returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end end # A method alias is a resolved alias entry that points to the exact method target it refers to # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#589 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#531 class RubyIndexer::Entry::MethodAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#601 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#543 sig do params( target: T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias), - unresolved_alias: ::RubyIndexer::Entry::UnresolvedMethodAlias, - encoding: ::Encoding + unresolved_alias: ::RubyIndexer::Entry::UnresolvedMethodAlias ).void end - def initialize(target, unresolved_alias, encoding); end + def initialize(target, unresolved_alias); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#619 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#560 sig { returns(::String) } def decorated_parameters; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#624 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#565 sig { returns(::String) } def formatted_signatures; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#596 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#538 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#629 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#570 sig { returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#593 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#535 sig { returns(T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias)) } def target; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#202 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#175 class RubyIndexer::Entry::Module < ::RubyIndexer::Entry::Namespace; end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#120 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#106 class RubyIndexer::Entry::ModuleOperation abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#130 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#116 sig { params(module_name: ::String).void } def initialize(module_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#127 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#113 sig { returns(::String) } def module_name; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#138 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#124 class RubyIndexer::Entry::Namespace < ::RubyIndexer::Entry abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#161 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#146 sig do params( nesting: T::Array[::String], file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - name_location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(nesting, file_path, location, name_location, comments, encoding); end + def initialize(nesting, file_path, location, name_location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#197 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#170 sig { returns(::Integer) } def ancestor_hash; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#184 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#157 sig { returns(T::Array[::String]) } def mixin_operation_module_names; end @@ -621,46 +715,46 @@ class RubyIndexer::Entry::Namespace < ::RubyIndexer::Entry # code. Maintaining the order is essential to linearize ancestors the right way when a module is both included # and prepended # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#192 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#165 sig { returns(T::Array[::RubyIndexer::Entry::ModuleOperation]) } def mixin_operations; end # Returns the location of the constant name, excluding the parent class or the body # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#149 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#135 sig { returns(::RubyIndexer::Location) } def name_location; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#145 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#131 sig { returns(T::Array[::String]) } def nesting; end end # An optional keyword method parameter, e.g. `def foo(a: 123)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#307 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#267 class RubyIndexer::Entry::OptionalKeywordParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#309 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#269 sig { override.returns(::Symbol) } def decorated_name; end end # An optional method parameter, e.g. `def foo(a = 123)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#291 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#251 class RubyIndexer::Entry::OptionalParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#293 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#253 sig { override.returns(::Symbol) } def decorated_name; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#267 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#227 class RubyIndexer::Entry::Parameter abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#281 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#241 sig { params(name: ::Symbol).void } def initialize(name:); end @@ -669,53 +763,53 @@ class RubyIndexer::Entry::Parameter # # @return [Symbol] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def decorated_name(*args, **_arg1, &blk); end # Name includes just the name of the parameter, excluding symbols like splats # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#275 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#235 sig { returns(::Symbol) } def name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#136 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#122 class RubyIndexer::Entry::Prepend < ::RubyIndexer::Entry::ModuleOperation; end # A required method parameter, e.g. `def foo(a)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#287 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#247 class RubyIndexer::Entry::RequiredParameter < ::RubyIndexer::Entry::Parameter; end # A rest method parameter, e.g. `def foo(*a)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#315 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#275 class RubyIndexer::Entry::RestParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#319 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#279 sig { override.returns(::Symbol) } def decorated_name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#316 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#276 RubyIndexer::Entry::RestParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) # Ruby doesn't support method overloading, so a method will have only one signature. # However RBS can represent the concept of method overloading, with different return types based on the arguments # passed, so we need to store all the signatures. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#637 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#578 class RubyIndexer::Entry::Signature - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#644 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#585 sig { params(parameters: T::Array[::RubyIndexer::Entry::Parameter]).void } def initialize(parameters); end # Returns a string with the decorated names of the parameters of this member. E.g.: `(a, b = 1, c: 2)` # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#650 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#591 sig { returns(::String) } def format; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#742 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#683 sig { params(args: T.nilable(T::Array[::Prism::Node]), names: T::Array[::Symbol]).returns(T::Boolean) } def keyword_arguments_match?(args, names); end @@ -735,15 +829,15 @@ class RubyIndexer::Entry::Signature # foo(1, 2) # ``` # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#670 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#611 sig { params(arguments: T::Array[::Prism::Node]).returns(T::Boolean) } def matches?(arguments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#641 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#582 sig { returns(T::Array[::RubyIndexer::Entry::Parameter]) } def parameters; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#729 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#670 sig do params( positional_args: T::Array[::Prism::Node], @@ -756,18 +850,17 @@ class RubyIndexer::Entry::Signature def positional_arguments_match?(positional_args, forwarding_arguments, keyword_args, min_pos, max_pos); end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#235 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#207 class RubyIndexer::Entry::SingletonClass < ::RubyIndexer::Entry::Class - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#246 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#217 sig do params( - location: ::Prism::Location, - name_location: ::Prism::Location, - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def update_singleton_information(location, name_location, comments, encoding); end + def update_singleton_information(location, name_location, comments); end end # An UnresolvedAlias points to a constant alias with a right hand side that has not yet been resolved. For @@ -781,27 +874,26 @@ end # target in [rdoc-ref:Index#resolve]. If the right hand side contains a constant that doesn't exist, then it's not # possible to resolve the alias and it will remain an UnresolvedAlias until the right hand side constant exists # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#482 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#428 class RubyIndexer::Entry::UnresolvedConstantAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#502 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#447 sig do params( target: ::String, nesting: T::Array[::String], name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(target, nesting, name, file_path, location, comments, encoding); end + def initialize(target, nesting, name, file_path, location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#489 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#435 sig { returns(T::Array[::String]) } def nesting; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#486 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#432 sig { returns(::String) } def target; end end @@ -810,32 +902,31 @@ end # example, if we have `alias a b`, we create an unresolved alias for `a` because we aren't sure immediate what `b` # is referring to # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#559 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#502 class RubyIndexer::Entry::UnresolvedMethodAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#579 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#521 sig do params( new_name: ::String, old_name: ::String, owner: T.nilable(::RubyIndexer::Entry::Namespace), file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(new_name, old_name, owner, file_path, location, comments, encoding); end + def initialize(new_name, old_name, owner, file_path, location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#563 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#506 sig { returns(::String) } def new_name; end # @return [String] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#563 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#506 def old_name; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#566 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#509 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end end @@ -851,23 +942,23 @@ end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#5 class RubyIndexer::Index - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#18 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#19 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#104 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#96 sig { params(fully_qualified_name: ::String).returns(T.nilable(T::Array[::RubyIndexer::Entry])) } def [](fully_qualified_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#95 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#87 sig { params(entry: ::RubyIndexer::Entry, skip_prefix_tree: T::Boolean).void } def add(entry, skip_prefix_tree: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#15 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#16 sig { returns(::RubyIndexer::Configuration) } def configuration; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#256 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#248 sig do params( name: ::String, @@ -876,7 +967,7 @@ class RubyIndexer::Index end def constant_completion_candidates(name, nesting); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#67 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#59 sig { params(indexable: ::RubyIndexer::IndexablePath).void } def delete(indexable); end @@ -884,7 +975,7 @@ class RubyIndexer::Index sig { returns(T::Boolean) } def empty?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#683 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#682 sig do type_parameters(:T) .params( @@ -901,7 +992,7 @@ class RubyIndexer::Index # Searches for a constant based on an unqualified name and returns the first possible match regardless of whether # there are more possible matching entries # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#125 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#117 sig do params( name: ::String @@ -926,7 +1017,7 @@ class RubyIndexer::Index # Fuzzy searches index entries based on Jaro-Winkler similarity. If no query is provided, all entries are returned # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#174 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#166 sig { params(query: T.nilable(::String)).returns(T::Array[::RubyIndexer::Entry]) } def fuzzy_search(query); end @@ -941,7 +1032,7 @@ class RubyIndexer::Index # and control indexing progress. That block is invoked with the current progress percentage and should return `true` # to continue indexing or `false` to stop indexing. # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#362 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#354 sig do params( indexable_paths: T::Array[::RubyIndexer::IndexablePath], @@ -950,7 +1041,7 @@ class RubyIndexer::Index end def index_all(indexable_paths: T.unsafe(nil), &block); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#378 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#379 sig do params( indexable_path: ::RubyIndexer::IndexablePath, @@ -990,7 +1081,7 @@ class RubyIndexer::Index sig { params(fully_qualified_name: ::String).returns(T::Array[::String]) } def linearized_ancestors_of(fully_qualified_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#203 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#195 sig do params( name: T.nilable(::String), @@ -1017,7 +1108,7 @@ class RubyIndexer::Index # ] # ``` # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#155 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#147 sig do params( query: ::String, @@ -1026,15 +1117,9 @@ class RubyIndexer::Index end def prefix_search(query, nesting = T.unsafe(nil)); end - # Register an enhancement to the index. Enhancements must conform to the `Enhancement` interface - # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#56 - sig { params(enhancement: ::RubyIndexer::Enhancement).void } - def register_enhancement(enhancement); end - # Register an included `hook` that will be executed when `module_name` is included into any namespace # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#62 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#54 sig do params( module_name: ::String, @@ -1051,7 +1136,7 @@ class RubyIndexer::Index # seen_names: this parameter should not be used by consumers of the api. It is used to avoid infinite recursion when # resolving circular references # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#321 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#313 sig do params( name: ::String, @@ -1088,22 +1173,22 @@ class RubyIndexer::Index end def resolve_method(method_name, receiver_name, seen_names = T.unsafe(nil), inherited_only: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#109 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#101 sig { params(query: ::String).returns(T::Array[::RubyIndexer::IndexablePath]) } def search_require_paths(query); end private - # Removes redudancy from a constant reference's full name. For example, if we find a reference to `A::B::Foo` inside - # of the ["A", "B"] nesting, then we should not concatenate the nesting with the name or else we'll end up with - # `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and the - # nesting + # Removes redundancy from a constant reference's full name. For example, if we find a reference to `A::B::Foo` + # inside of the ["A", "B"] nesting, then we should not concatenate the nesting with the name or else we'll end up + # with `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and + # the nesting # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#983 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#982 sig { params(name: ::String, nesting: T::Array[::String]).returns(::String) } def build_non_redundant_full_name(name, nesting); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1021 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1014 sig do params( full_name: ::String, @@ -1112,7 +1197,7 @@ class RubyIndexer::Index end def direct_or_aliased_constant(full_name, seen_names); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#944 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#943 sig do params( name: T.nilable(::String), @@ -1124,7 +1209,7 @@ class RubyIndexer::Index # Linearize mixins for an array of namespace entries. This method will mutate the `ancestors` array with the # linearized ancestors of the mixins # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#729 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#728 sig do params( ancestors: T::Array[::String], @@ -1137,7 +1222,7 @@ class RubyIndexer::Index # Linearize the superclass of a given namespace (including modules with the implicit `Module` superclass). This # method will mutate the `ancestors` array with the linearized ancestors of the superclass # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#779 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#778 sig do params( ancestors: T::Array[::String], @@ -1150,7 +1235,7 @@ class RubyIndexer::Index end def linearize_superclass(ancestors, attached_class_name, fully_qualified_name, namespace_entries, nesting, singleton_levels); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#914 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#913 sig do params( name: ::String, @@ -1160,7 +1245,7 @@ class RubyIndexer::Index end def lookup_ancestor_chain(name, nesting, seen_names); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#885 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#884 sig do params( name: ::String, @@ -1173,7 +1258,7 @@ class RubyIndexer::Index # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant # that doesn't exist, then we return the same UnresolvedAlias # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#852 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#851 sig do params( entry: ::RubyIndexer::Entry::UnresolvedConstantAlias, @@ -1185,7 +1270,7 @@ class RubyIndexer::Index # Attempt to resolve a given unresolved method alias. This method returns the resolved alias if we managed to # identify the target or the same unresolved alias entry if we couldn't # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1043 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1036 sig do params( entry: ::RubyIndexer::Entry::UnresolvedMethodAlias, @@ -1197,16 +1282,19 @@ class RubyIndexer::Index # Runs the registered included hooks # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#694 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#693 sig { params(fully_qualified_name: ::String, nesting: T::Array[::String]).void } def run_included_hooks(fully_qualified_name, nesting); end end # The minimum Jaro-Winkler similarity score for an entry to be considered a match for a given fuzzy search query # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#12 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#13 RubyIndexer::Index::ENTRY_SIMILARITY_THRESHOLD = T.let(T.unsafe(nil), Float) +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#10 +class RubyIndexer::Index::IndexNotEmptyError < ::StandardError; end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#9 class RubyIndexer::Index::NonExistingNamespaceError < ::StandardError; end @@ -1237,28 +1325,39 @@ end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#5 class RubyIndexer::Location - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#19 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#41 sig { params(start_line: ::Integer, end_line: ::Integer, start_column: ::Integer, end_column: ::Integer).void } def initialize(start_line, end_line, start_column, end_column); end # @return [Integer] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 def end_column; end # @return [Integer] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 def end_line; end # @return [Integer] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 def start_column; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 sig { returns(::Integer) } def start_line; end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#20 + sig do + params( + prism_location: ::Prism::Location, + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) + ).returns(T.attached_class) + end + def from_prism_location(prism_location, code_units_cache); end + end end # A PrefixTree is a data structure that allows searching for partial strings fast. The tree is similar to a nested @@ -1403,7 +1502,7 @@ class RubyIndexer::RBSIndexer end def add_declaration_mixins_to_entry(declaration, entry); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#321 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#316 sig do params( declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Constant, ::RBS::AST::Declarations::Global, ::RBS::AST::Declarations::Module, ::RBS::AST::Members::Alias, ::RBS::AST::Members::MethodDefinition) @@ -1435,7 +1534,7 @@ class RubyIndexer::RBSIndexer # # And we need to handle their nesting differently. # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#265 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#264 sig do params( declaration: ::RBS::AST::Declarations::Constant, @@ -1445,7 +1544,7 @@ class RubyIndexer::RBSIndexer end def handle_constant(declaration, nesting, file_path); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#277 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#275 sig { params(declaration: ::RBS::AST::Declarations::Global, pathname: ::Pathname).void } def handle_global_variable(declaration, pathname); end @@ -1453,11 +1552,11 @@ class RubyIndexer::RBSIndexer sig { params(member: ::RBS::AST::Members::MethodDefinition, owner: ::RubyIndexer::Entry::Namespace).void } def handle_method(member, owner); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#294 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#290 sig { params(member: ::RBS::AST::Members::Alias, owner_entry: ::RubyIndexer::Entry::Namespace).void } def handle_signature_alias(member, owner_entry); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#176 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#175 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::Parameter]) } def parse_arguments(function); end @@ -1465,11 +1564,11 @@ class RubyIndexer::RBSIndexer sig { params(declaration: ::RBS::AST::Declarations::Base, pathname: ::Pathname).void } def process_declaration(declaration, pathname); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#235 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#234 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::OptionalKeywordParameter]) } def process_optional_keywords(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#155 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#154 sig do params( overload: ::RBS::AST::Members::MethodDefinition::Overload @@ -1477,27 +1576,27 @@ class RubyIndexer::RBSIndexer end def process_overload(overload); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#188 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#187 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::RequiredParameter]) } def process_required_and_optional_positionals(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#228 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#227 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::KeywordParameter]) } def process_required_keywords(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#242 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#241 sig { params(function: ::RBS::Types::Function).returns(::RubyIndexer::Entry::KeywordRestParameter) } def process_rest_keywords(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#219 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#218 sig { params(function: ::RBS::Types::Function).returns(::RubyIndexer::Entry::RestParameter) } def process_rest_positionals(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#212 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#211 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::OptionalParameter]) } def process_trailing_positionals(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#147 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#146 sig { params(member: ::RBS::AST::Members::MethodDefinition).returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures(member); end @@ -1719,7 +1818,7 @@ class RubyLsp::Addon # Creates a new CodeLens listener. This method is invoked on every CodeLens request # - # source://ruby-lsp/lib/ruby_lsp/addon.rb#205 + # source://ruby-lsp/lib/ruby_lsp/addon.rb#212 sig do overridable .params( @@ -1732,7 +1831,7 @@ class RubyLsp::Addon # Creates a new Completion listener. This method is invoked on every Completion request # - # source://ruby-lsp/lib/ruby_lsp/addon.rb#257 + # source://ruby-lsp/lib/ruby_lsp/addon.rb#264 sig do overridable .params( @@ -1746,7 +1845,7 @@ class RubyLsp::Addon # Creates a new Definition listener. This method is invoked on every Definition request # - # source://ruby-lsp/lib/ruby_lsp/addon.rb#246 + # source://ruby-lsp/lib/ruby_lsp/addon.rb#253 sig do overridable .params( @@ -1760,7 +1859,7 @@ class RubyLsp::Addon # Creates a new DocumentSymbol listener. This method is invoked on every DocumentSymbol request # - # source://ruby-lsp/lib/ruby_lsp/addon.rb#224 + # source://ruby-lsp/lib/ruby_lsp/addon.rb#231 sig do overridable .params( @@ -1772,7 +1871,7 @@ class RubyLsp::Addon # Creates a new Hover listener. This method is invoked on every Hover request # - # source://ruby-lsp/lib/ruby_lsp/addon.rb#215 + # source://ruby-lsp/lib/ruby_lsp/addon.rb#222 sig do overridable .params( @@ -1783,7 +1882,7 @@ class RubyLsp::Addon end def create_hover_listener(response_builder, node_context, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/addon.rb#232 + # source://ruby-lsp/lib/ruby_lsp/addon.rb#239 sig do overridable .params( @@ -1814,6 +1913,15 @@ class RubyLsp::Addon sig { returns(::String) } def formatted_errors; end + # Handle a response from a window/showMessageRequest request. Add-ons must include the addon_name as part of the + # original request so that the response is delegated to the correct add-on and must override this method to handle + # the response + # https://microsoft.github.io/language-server-protocol/specification#window_showMessageRequest + # + # source://ruby-lsp/lib/ruby_lsp/addon.rb#202 + sig { overridable.params(title: ::String).void } + def handle_window_show_message_response(title); end + # Add-ons should override the `name` method to return the add-on name # # @abstract @@ -1885,7 +1993,7 @@ class RubyLsp::Addon sig { params(addon_name: ::String, version_constraints: ::String).returns(::RubyLsp::Addon) } def get(addon_name, *version_constraints); end - # Automatically track and instantiate addon classes + # Automatically track and instantiate add-on classes # # source://ruby-lsp/lib/ruby_lsp/addon.rb#51 sig { params(child_class: T.class_of(RubyLsp::Addon)).void } @@ -1923,56 +2031,93 @@ class RubyLsp::BaseServer abstract! # source://ruby-lsp/lib/ruby_lsp/base_server.rb#12 - sig { params(test_mode: T::Boolean).void } - def initialize(test_mode: T.unsafe(nil)); end + sig { params(options: T.untyped).void } + def initialize(**options); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#134 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#143 sig { params(id: ::Integer, message: ::String, type: ::Integer).void } def fail_request_and_notify(id, message, type: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#140 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#149 sig { returns(::Thread) } def new_worker; end # This method is only intended to be used in tests! Pops the latest response that would be sent to the client # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#123 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#132 sig { returns(T.untyped) } def pop_response; end # @abstract # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#128 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#137 sig { abstract.params(message: T::Hash[::Symbol, T.untyped]).void } def process_message(message); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#109 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#118 sig { void } def run_shutdown; end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#171 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#180 sig { params(id: ::Integer).void } def send_empty_response(id); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#176 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#185 sig { params(message: ::String, type: ::Integer).void } def send_log_message(message, type: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#160 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#169 sig { params(message: T.any(::RubyLsp::Error, ::RubyLsp::Notification, ::RubyLsp::Request, ::RubyLsp::Result)).void } def send_message(message); end # @abstract # - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#131 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#140 sig { abstract.void } def shutdown; end - # source://ruby-lsp/lib/ruby_lsp/base_server.rb#39 + # source://ruby-lsp/lib/ruby_lsp/base_server.rb#46 sig { void } def start; end end +# This class stores all client capabilities that the Ruby LSP and its add-ons depend on to ensure that we're +# not enabling functionality unsupported by the editor connecting to the server +# +# source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#7 +class RubyLsp::ClientCapabilities + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#17 + sig { void } + def initialize; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#38 + sig { params(capabilities: T::Hash[::Symbol, T.untyped]).void } + def apply_client_capabilities(capabilities); end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def supports_progress; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#63 + sig { returns(T::Boolean) } + def supports_rename?; end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def supports_request_delegation; end + + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + sig { returns(T::Boolean) } + def supports_watching_files; end + + # @return [Boolean] + # + # source://ruby-lsp/lib/ruby_lsp/client_capabilities.rb#11 + def window_show_message_supports_extra_properties; end +end + # source://ruby-lsp/lib/ruby_lsp/utils.rb#7 RubyLsp::Constant = LanguageServer::Protocol::Constant @@ -2008,7 +2153,7 @@ class RubyLsp::Document sig { params(other: RubyLsp::Document[T.untyped]).returns(T::Boolean) } def ==(other); end - # TODO: remove this method once all nonpositional requests have been migrated to the listener pattern + # TODO: remove this method once all non-positional requests have been migrated to the listener pattern # # source://ruby-lsp/lib/ruby_lsp/document.rb#74 sig do @@ -2142,23 +2287,27 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: Prism::ParseResult } } - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#15 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#23 sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#10 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#20 + sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } + def code_units_cache; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#12 sig { returns(::String) } def host_language_source; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#62 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#75 sig { params(char_position: ::Integer).returns(T.nilable(T::Boolean)) } def inside_host_language?(char_position); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#42 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#55 sig { override.returns(::RubyLsp::Document::LanguageId) } def language_id; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#52 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#65 sig do params( position: T::Hash[::Symbol, T.untyped], @@ -2167,60 +2316,60 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document end def locate_node(position, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#23 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#35 sig { override.returns(T::Boolean) } def parse!; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#37 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#50 sig { override.returns(T::Boolean) } def syntax_error?; end end -# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#67 +# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#80 class RubyLsp::ERBDocument::ERBScanner - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#74 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#87 sig { params(source: ::String).void } def initialize(source); end # @return [String] # - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#71 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 def host_language; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#71 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 sig { returns(::String) } def ruby; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#83 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#96 sig { void } def scan; end private - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#159 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#172 sig { returns(::String) } def next_char; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#148 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#161 sig { params(char: ::String).void } def push_char(char); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#93 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#106 sig { void } def scan_char; end end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#107 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#170 class RubyLsp::Error - # source://ruby-lsp/lib/ruby_lsp/utils.rb#114 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#177 sig { params(id: ::Integer, code: ::Integer, message: ::String, data: T.nilable(T::Hash[::Symbol, T.untyped])).void } def initialize(id:, code:, message:, data: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#111 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#174 sig { returns(::String) } def message; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#122 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#185 sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end @@ -2237,33 +2386,36 @@ class RubyLsp::GlobalState sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#62 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#69 sig { returns(T.nilable(::RubyLsp::Requests::Support::Formatter)) } def active_formatter; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#67 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#74 sig { returns(T::Array[::RubyLsp::Requests::Support::Formatter]) } def active_linters; end # Applies the options provided by the editor and returns an array of notifications to send back to the client # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#73 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#80 sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T::Array[::RubyLsp::Notification]) } def apply_options(options); end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#30 + sig { returns(::RubyLsp::ClientCapabilities) } + def client_capabilities; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#148 + sig { params(flag: ::Symbol).returns(T.nilable(T::Boolean)) } + def enabled_feature?(flag); end + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#21 sig { returns(::Encoding) } def encoding; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#152 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#158 sig { returns(::String) } def encoding_name; end - # @return [Boolean] - # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#24 - def experimental_features; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#12 sig { returns(::String) } def formatter; end @@ -2281,24 +2433,15 @@ class RubyLsp::GlobalState sig { returns(::RubyIndexer::Index) } def index; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#57 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#64 sig { params(identifier: ::String, instance: ::RubyLsp::Requests::Support::Formatter).void } def register_formatter(identifier, instance); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#52 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#59 sig { params(addon_name: ::String).returns(T.nilable(T::Hash[::Symbol, T.untyped])) } def settings_for_addon(addon_name); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#27 - sig { returns(T::Array[::String]) } - def supported_resource_operations; end - - # @return [Boolean] - # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#24 - def supports_request_delegation; end - - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#24 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#170 sig { returns(T::Boolean) } def supports_watching_files; end @@ -2306,52 +2449,56 @@ class RubyLsp::GlobalState sig { returns(::String) } def test_library; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#30 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#24 + sig { returns(T::Boolean) } + def top_level_bundle; end + + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#27 sig { returns(::RubyLsp::TypeInferrer) } def type_inferrer; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#147 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#153 sig { returns(::String) } def workspace_path; end private - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#222 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#233 sig { returns(T::Boolean) } def bin_rails_present; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#166 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#177 sig { params(direct_dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(::String) } def detect_formatter(direct_dependencies, all_dependencies); end # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a # single linter. To have multiple linters running, the user must configure them manually # - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#182 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#193 sig { params(dependencies: T::Array[::String], all_dependencies: T::Array[::String]).returns(T::Array[::String]) } def detect_linters(dependencies, all_dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#193 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#204 sig { params(dependencies: T::Array[::String]).returns(::String) } def detect_test_library(dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#213 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#224 sig { params(dependencies: T::Array[::String]).returns(T::Boolean) } def detect_typechecker(dependencies); end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#227 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#238 sig { returns(T::Boolean) } def dot_rubocop_yml_present; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#247 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#260 sig { returns(T::Array[::String]) } def gather_direct_and_indirect_dependencies; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#232 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#243 sig { returns(T::Array[::String]) } def gather_direct_dependencies; end - # source://ruby-lsp/lib/ruby_lsp/global_state.rb#240 + # source://ruby-lsp/lib/ruby_lsp/global_state.rb#253 sig { returns(T::Array[::String]) } def gemspec_dependencies; end end @@ -2475,57 +2622,81 @@ class RubyLsp::Listeners::Completion end def initialize(response_builder, global_state, node_context, sorbet_level, dispatcher, uri, trigger_character); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#140 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#146 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end # Handle completion on namespaced constant references (e.g. `Foo::Bar`) # - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#122 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#128 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end # Handle completion on regular constant references (e.g. `Bar`) # - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#99 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#105 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#194 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#190 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#195 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#200 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#205 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#210 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#215 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#230 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#199 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#235 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#204 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#240 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#184 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#220 sig { params(node: ::Prism::InstanceVariableReadNode).void } def on_instance_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#209 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#245 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#189 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#225 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#430 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#492 sig { params(node: ::Prism::CallNode, name: ::String).void } def add_keyword_completions(node, name); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#410 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#472 sig { params(node: ::Prism::CallNode, name: ::String).void } def add_local_completions(node, name); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#448 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#510 sig do params( label: ::String, @@ -2534,7 +2705,7 @@ class RubyLsp::Listeners::Completion end def build_completion(label, node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#471 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#533 sig do params( real_name: ::String, @@ -2546,23 +2717,27 @@ class RubyLsp::Listeners::Completion end def build_entry_completion(real_name, incomplete_name, range, entries, top_level); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#349 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#408 sig { params(node: ::Prism::CallNode, name: ::String).void } def complete_methods(node, name); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#304 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#363 sig { params(node: ::Prism::CallNode).void } def complete_require(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#320 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#379 sig { params(node: ::Prism::CallNode).void } def complete_require_relative(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#216 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#252 sig { params(name: ::String, range: ::LanguageServer::Protocol::Interface::Range).void } def constant_path_completion(name, range); end - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#271 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#307 + sig { params(name: ::String, location: ::Prism::Location).void } + def handle_global_variable_completion(name, location); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#330 sig { params(name: ::String, location: ::Prism::Location).void } def handle_instance_variable_completion(name, location); end @@ -2581,7 +2756,7 @@ class RubyLsp::Listeners::Completion # end # ``` # - # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#560 + # source://ruby-lsp/lib/ruby_lsp/listeners/completion.rb#622 sig { params(entry_name: ::String).returns(T::Boolean) } def top_level?(entry_name); end end @@ -2607,77 +2782,105 @@ class RubyLsp::Listeners::Definition end def initialize(response_builder, global_state, language_id, uri, node_context, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#97 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#103 sig { params(node: ::Prism::BlockArgumentNode).void } def on_block_argument_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#56 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#62 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#108 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#114 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#116 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#122 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#159 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#195 sig { params(node: ::Prism::ForwardingSuperNode).void } def on_forwarding_super_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#134 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#130 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#135 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#140 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#145 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#150 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#155 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#170 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#139 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#175 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#144 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#180 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#124 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#160 sig { params(node: ::Prism::InstanceVariableReadNode).void } def on_instance_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#149 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#185 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#129 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#165 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#75 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#81 sig { params(node: ::Prism::StringNode).void } def on_string_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#154 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#190 sig { params(node: ::Prism::SuperNode).void } def on_super_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#86 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#92 sig { params(node: ::Prism::SymbolNode).void } def on_symbol_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#281 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#336 sig { params(value: ::String).void } def find_in_index(value); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#270 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#325 sig { params(node: ::Prism::CallNode).void } def handle_autoload_definition(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#181 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#217 + sig { params(name: ::String).void } + def handle_global_variable_definition(name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#236 sig { params(name: ::String).void } def handle_instance_variable_definition(name); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#208 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#263 sig do params( message: ::String, @@ -2687,11 +2890,11 @@ class RubyLsp::Listeners::Definition end def handle_method_definition(message, receiver_type, inherited_only: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#235 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#290 sig { params(node: ::Prism::StringNode, message: ::Symbol).void } def handle_require_definition(node, message); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#166 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#202 sig { void } def handle_super_node_definition; end end @@ -2703,216 +2906,253 @@ RubyLsp::Listeners::Definition::MAX_NUMBER_OF_DEFINITION_CANDIDATES_WITHOUT_RECE class RubyLsp::Listeners::DocumentHighlight include ::RubyLsp::Requests::Support::Common - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#97 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#98 sig do params( response_builder: RubyLsp::ResponseBuilders::CollectionResponseBuilder[::LanguageServer::Protocol::Interface::DocumentHighlight], target: T.nilable(::Prism::Node), parent: T.nilable(::Prism::Node), - dispatcher: ::Prism::Dispatcher + dispatcher: ::Prism::Dispatcher, + position: T::Hash[::Symbol, T.untyped] ).void end - def initialize(response_builder, target, parent, dispatcher); end + def initialize(response_builder, target, parent, dispatcher, position); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#240 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#254 sig { params(node: ::Prism::BlockParameterNode).void } def on_block_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#180 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#192 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#254 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#540 + sig { params(node: ::Prism::CaseNode).void } + def on_case_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#268 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#424 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#442 sig { params(node: ::Prism::ClassVariableAndWriteNode).void } def on_class_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#417 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#435 sig { params(node: ::Prism::ClassVariableOperatorWriteNode).void } def on_class_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#410 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#428 sig { params(node: ::Prism::ClassVariableOrWriteNode).void } def on_class_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#296 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#314 sig { params(node: ::Prism::ClassVariableReadNode).void } def on_class_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#226 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#240 sig { params(node: ::Prism::ClassVariableTargetNode).void } def on_class_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#403 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#421 sig { params(node: ::Prism::ClassVariableWriteNode).void } def on_class_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#480 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#498 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#445 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#463 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#438 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#456 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#324 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#342 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#275 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#293 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#331 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#349 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#317 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#335 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#212 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#226 sig { params(node: ::Prism::ConstantPathTargetNode).void } def on_constant_path_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#310 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#328 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#282 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#300 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#219 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#233 sig { params(node: ::Prism::ConstantTargetNode).void } def on_constant_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#431 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#449 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#191 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#203 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#501 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#561 + sig { params(node: ::Prism::ForNode).void } + def on_for_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#519 sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } def on_global_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#508 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#526 sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } def on_global_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#494 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#512 sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } def on_global_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#303 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#321 sig { params(node: ::Prism::GlobalVariableReadNode).void } def on_global_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#198 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#212 sig { params(node: ::Prism::GlobalVariableTargetNode).void } def on_global_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#487 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#505 sig { params(node: ::Prism::GlobalVariableWriteNode).void } def on_global_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#466 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#568 + sig { params(node: ::Prism::IfNode).void } + def on_if_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#484 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#473 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#491 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#459 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#477 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#289 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#307 sig { params(node: ::Prism::InstanceVariableReadNode).void } def on_instance_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#205 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#219 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#452 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#470 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#374 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#392 sig { params(node: ::Prism::KeywordRestParameterNode).void } def on_keyword_rest_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#382 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#400 sig { params(node: ::Prism::LocalVariableAndWriteNode).void } def on_local_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#389 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#407 sig { params(node: ::Prism::LocalVariableOperatorWriteNode).void } def on_local_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#396 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#414 sig { params(node: ::Prism::LocalVariableOrWriteNode).void } def on_local_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#268 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#286 sig { params(node: ::Prism::LocalVariableReadNode).void } def on_local_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#233 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#247 sig { params(node: ::Prism::LocalVariableTargetNode).void } def on_local_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#338 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#356 sig { params(node: ::Prism::LocalVariableWriteNode).void } def on_local_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#261 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#277 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#352 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#370 sig { params(node: ::Prism::OptionalKeywordParameterNode).void } def on_optional_keyword_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#367 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#385 sig { params(node: ::Prism::OptionalParameterNode).void } def on_optional_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#345 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#363 sig { params(node: ::Prism::RequiredKeywordParameterNode).void } def on_required_keyword_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#247 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#261 sig { params(node: ::Prism::RequiredParameterNode).void } def on_required_parameter_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#359 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#377 sig { params(node: ::Prism::RestParameterNode).void } def on_rest_parameter_node_enter(node); end + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#533 + sig { params(node: ::Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#575 + sig { params(node: ::Prism::UnlessNode).void } + def on_unless_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#554 + sig { params(node: ::Prism::UntilNode).void } + def on_until_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#547 + sig { params(node: ::Prism::WhileNode).void } + def on_while_node_enter(node); end + private - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#522 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#589 sig { params(kind: ::Integer, location: ::Prism::Location).void } def add_highlight(kind, location); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#517 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#622 + sig { params(keyword_loc: T.nilable(::Prism::Location), end_loc: T.nilable(::Prism::Location)).void } + def add_matching_end_highlights(keyword_loc, end_loc); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#631 + sig { params(location: ::Prism::Location).returns(T::Boolean) } + def covers_target_position?(location); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#584 sig { params(node: ::Prism::Node, classes: T::Array[T.class_of(Prism::Node)]).returns(T.nilable(T::Boolean)) } def matches?(node, classes); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#527 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_highlight.rb#594 sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } def node_value(node); end end @@ -3009,101 +3249,113 @@ class RubyLsp::Listeners::DocumentSymbol end def initialize(response_builder, uri, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#273 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#306 sig { params(node: ::Prism::AliasMethodNode).void } def on_alias_method_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#84 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#87 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#98 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#101 sig { params(node: ::Prism::CallNode).void } def on_call_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#52 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#55 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#62 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#65 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#263 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#256 sig { params(node: ::Prism::ClassVariableWriteNode).void } def on_class_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#167 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#170 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#177 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#180 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#157 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#160 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#127 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#130 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#147 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#150 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#137 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#140 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#197 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#200 sig { params(node: ::Prism::ConstantPathTargetNode).void } def on_constant_path_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#107 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#110 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#187 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#190 sig { params(node: ::Prism::ConstantTargetNode).void } def on_constant_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#117 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#120 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#222 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#225 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#207 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#210 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#253 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#296 + sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#276 + sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#286 + sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#266 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#212 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#215 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#248 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#251 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#67 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#70 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#79 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#82 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end private - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#298 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#331 sig do params( name: ::String, @@ -3114,23 +3366,23 @@ class RubyLsp::Listeners::DocumentSymbol end def create_document_symbol(name:, kind:, range_location:, selection_range_location:); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#347 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#380 sig { params(node: ::Prism::CallNode).void } def handle_alias_method(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#314 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#347 sig { params(node: ::Prism::CallNode).void } def handle_attr_accessor(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#380 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#413 sig { params(node: ::Prism::CallNode).void } def handle_rake_namespace(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#406 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#439 sig { params(node: ::Prism::CallNode).void } def handle_rake_task(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#441 + # source://ruby-lsp/lib/ruby_lsp/listeners/document_symbol.rb#474 sig { returns(T::Boolean) } def rake?; end end @@ -3279,7 +3531,7 @@ end class RubyLsp::Listeners::Hover include ::RubyLsp::Requests::Support::Common - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#50 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#56 sig do params( response_builder: RubyLsp::ResponseBuilders::Hover, @@ -3292,98 +3544,126 @@ class RubyLsp::Listeners::Hover end def initialize(response_builder, global_state, uri, node_context, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#117 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#129 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#107 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#119 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#90 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#102 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#100 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#112 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#167 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#209 sig { params(node: ::Prism::ForwardingSuperNode).void } def on_forwarding_super_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#142 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#144 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#149 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#154 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#159 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#164 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#169 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#184 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#147 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#189 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#152 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#194 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#132 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#174 sig { params(node: ::Prism::InstanceVariableReadNode).void } def on_instance_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#157 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#199 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#137 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#179 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#85 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#97 sig { params(node: ::Prism::InterpolatedStringNode).void } def on_interpolated_string_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#80 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#92 sig { params(node: ::Prism::StringNode).void } def on_string_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#162 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#204 sig { params(node: ::Prism::SuperNode).void } def on_super_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#172 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#214 sig { params(node: ::Prism::YieldNode).void } def on_yield_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#284 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#336 sig { params(node: ::Prism::CallNode).void } def generate_gem_hover(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#179 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#221 sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } def generate_heredoc_hover(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#269 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#321 sig { params(name: ::String, location: ::Prism::Location).void } def generate_hover(name, location); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#250 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#311 + sig { params(name: ::String).void } + def handle_global_variable_hover(name); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#292 sig { params(name: ::String).void } def handle_instance_variable_hover(name); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#204 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#246 sig { params(keyword: ::String).void } def handle_keyword_documentation(keyword); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#227 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#269 sig { params(message: ::String, inherited_only: T::Boolean).void } def handle_method_hover(message, inherited_only: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#216 + # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#258 sig { void } def handle_super_node_hover; end end -# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#32 +# source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#38 RubyLsp::Listeners::Hover::ALLOWED_REMOTE_PROVIDERS = T.let(T.unsafe(nil), Array) # source://ruby-lsp/lib/ruby_lsp/listeners/hover.rb#10 @@ -3678,11 +3958,40 @@ end # source://ruby-lsp/lib/ruby_lsp/utils.rb#63 class RubyLsp::Notification < ::RubyLsp::Message - # source://ruby-lsp/lib/ruby_lsp/utils.rb#87 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#150 sig { override.returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end class << self + # source://ruby-lsp/lib/ruby_lsp/utils.rb#99 + sig do + params( + id: ::String, + title: ::String, + percentage: T.nilable(::Integer), + message: T.nilable(::String) + ).returns(::RubyLsp::Notification) + end + def progress_begin(id, title, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#136 + sig { params(id: ::String).returns(::RubyLsp::Notification) } + def progress_end(id); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#121 + sig do + params( + id: ::String, + percentage: T.nilable(::Integer), + message: T.nilable(::String) + ).returns(::RubyLsp::Notification) + end + def progress_report(id, percentage: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/utils.rb#84 + sig { params(data: T::Hash[::Symbol, T.untyped]).returns(::RubyLsp::Notification) } + def telemetry(data); end + # source://ruby-lsp/lib/ruby_lsp/utils.rb#76 sig { params(message: ::String, type: ::Integer).returns(::RubyLsp::Notification) } def window_log_message(message, type: T.unsafe(nil)); end @@ -3716,35 +4025,35 @@ class RubyLsp::RBSDocument < ::RubyLsp::Document def syntax_error?; end end -# source://ruby-lsp/lib/ruby_lsp/utils.rb#92 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#155 class RubyLsp::Request < ::RubyLsp::Message - # source://ruby-lsp/lib/ruby_lsp/utils.rb#96 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#159 sig { params(id: T.any(::Integer, ::String), method: ::String, params: ::Object).void } def initialize(id:, method:, params:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#102 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#165 sig { override.returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end # A request configuration, to turn on/off features # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#157 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#220 class RubyLsp::RequestConfig - # source://ruby-lsp/lib/ruby_lsp/utils.rb#164 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#227 sig { params(configuration: T::Hash[::Symbol, T::Boolean]).void } def initialize(configuration); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#161 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 sig { returns(T::Hash[::Symbol, T::Boolean]) } def configuration; end # @return [Hash{Symbol => Boolean}] # - # source://ruby-lsp/lib/ruby_lsp/utils.rb#161 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#224 def configuration=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#169 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#232 sig { params(feature: ::Symbol).returns(T.nilable(T::Boolean)) } def enabled?(feature); end end @@ -3779,7 +4088,7 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#259 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#265 sig do params( range: T::Hash[::Symbol, T.untyped], @@ -3788,11 +4097,11 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request end def create_text_edit(range, new_text); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#270 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#276 sig { params(node: ::Prism::BlockNode, indentation: T.nilable(::String)).returns(::String) } def recursively_switch_nested_block_styles(node, indentation); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#185 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#191 sig do returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) end @@ -3804,7 +4113,7 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request end def refactor_variable; end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#299 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#305 sig { params(body: ::Prism::Node, indentation: T.nilable(::String)).returns(::String) } def switch_block_body(body, indentation); end @@ -3907,7 +4216,7 @@ class RubyLsp::Requests::Completion < ::RubyLsp::Requests::Request end def initialize(document, global_state, params, sorbet_level, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#93 + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#99 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::CompletionItem]) } def perform; end @@ -3960,7 +4269,7 @@ RubyLsp::Requests::CompletionResolve::MAX_DOCUMENTATION_ENTRIES = T.let(T.unsafe # # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#11 class RubyLsp::Requests::Definition < ::RubyLsp::Requests::Request - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#30 + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#24 sig do params( document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), @@ -3972,16 +4281,19 @@ class RubyLsp::Requests::Definition < ::RubyLsp::Requests::Request end def initialize(document, global_state, position, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#105 + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#101 sig do override .returns(T::Array[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)]) end def perform; end -end -# source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#15 -RubyLsp::Requests::Definition::SPECIAL_METHOD_CALLS = T.let(T.unsafe(nil), Array) + private + + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#109 + sig { params(position: T::Hash[::Symbol, T.untyped], target: T.nilable(::Prism::Node)).returns(T::Boolean) } + def position_outside_target?(position, target); end +end # The # [diagnostics](https://microsoft.github.io/language-server-protocol/specification#textDocument_publishDiagnostics) @@ -4035,7 +4347,7 @@ class RubyLsp::Requests::DocumentHighlight < ::RubyLsp::Requests::Request end def initialize(global_state, document, position, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#41 + # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#51 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentHighlight]) } def perform; end end @@ -4066,20 +4378,21 @@ end # informs the editor of all the important symbols, such as classes, variables, and methods, defined in a file. With # this information, the editor can populate breadcrumbs, file outline and allow for fuzzy symbol searches. # -# In VS Code, fuzzy symbol search can be accessed by opening the command palette and inserting an `@` symbol. +# In VS Code, symbol search known as 'Go To Symbol in Editor' and can be accessed with Ctrl/Cmd-Shift-O, +# or by opening the command palette and inserting an `@` symbol. # -# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#14 +# source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#15 class RubyLsp::Requests::DocumentSymbol < ::RubyLsp::Requests::Request - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#27 + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#28 sig { params(uri: ::URI::Generic, dispatcher: ::Prism::Dispatcher).void } def initialize(uri, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#38 + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#39 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } def perform; end class << self - # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#21 + # source://ruby-lsp/lib/ruby_lsp/requests/document_symbol.rb#22 sig { returns(::LanguageServer::Protocol::Interface::DocumentSymbolOptions) } def provider; end end @@ -4150,10 +4463,20 @@ class RubyLsp::Requests::Hover < ::RubyLsp::Requests::Request end def initialize(document, global_state, position, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#78 + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#74 sig { override.returns(ResponseType) } def perform; end + private + + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#99 + sig { params(position: T::Hash[::Symbol, T.untyped], target: T.nilable(::Prism::Node)).returns(T::Boolean) } + def position_outside_target?(position, target); end + + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#92 + sig { params(parent: T.nilable(::Prism::Node), target: T.nilable(::Prism::Node)).returns(T::Boolean) } + def should_refine_target?(parent, target); end + class << self # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#18 sig { returns(::LanguageServer::Protocol::Interface::HoverOptions) } @@ -4332,7 +4655,7 @@ class RubyLsp::Requests::References < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#127 + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#129 sig do params( target: ::RubyIndexer::ReferenceFinder::Target, @@ -4342,7 +4665,7 @@ class RubyLsp::Requests::References < ::RubyLsp::Requests::Request end def collect_references(target, parse_result, uri); end - # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#104 + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#106 sig do params( target_node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::DefNode), @@ -4377,7 +4700,7 @@ class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#179 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#181 sig do params( name: ::String, @@ -4386,7 +4709,7 @@ class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request end def adjust_reference_for_edit(name, reference); end - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#168 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#170 sig do params( target: ::RubyIndexer::ReferenceFinder::Target, @@ -4415,7 +4738,7 @@ class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request end def collect_text_edits(target, name); end - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#189 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#191 sig { params(constant_name: ::String).returns(::String) } def file_from_constant_name(constant_name); end end @@ -4779,14 +5102,14 @@ module RubyLsp::Requests::Support::Formatter def run_range_formatting(uri, source, base_indentation); end end -# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#23 +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#34 class RubyLsp::Requests::Support::InternalRuboCopError < ::StandardError - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#33 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#44 sig { params(rubocop_error: T.any(::RuboCop::ErrorWithAnalyzedFileLocation, ::StandardError)).void } def initialize(rubocop_error); end end -# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#26 +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#37 RubyLsp::Requests::Support::InternalRuboCopError::MESSAGE = T.let(T.unsafe(nil), String) # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb#7 @@ -4891,51 +5214,51 @@ class RubyLsp::Requests::Support::RuboCopFormatter def run_range_formatting(uri, source, base_indentation); end end -# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#45 +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#56 class RubyLsp::Requests::Support::RuboCopRunner < ::RuboCop::Runner - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#75 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#86 sig { params(args: ::String).void } def initialize(*args); end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#54 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#75 sig { returns(::RuboCop::Config) } def config_for_working_directory; end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#114 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#125 sig { returns(::String) } def formatted_source; end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#51 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#72 sig { returns(T::Array[::RuboCop::Cop::Offense]) } def offenses; end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#92 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#103 sig { params(path: ::String, contents: ::String).void } def run(path, contents); end private - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#140 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#151 sig { params(_file: ::String, offenses: T::Array[::RuboCop::Cop::Offense]).void } def file_finished(_file, offenses); end class << self - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#122 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#133 sig { params(cop_name: ::String).returns(T.nilable(T.class_of(RuboCop::Cop::Base))) } def find_cop_by_name(cop_name); end private - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#129 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#140 sig { returns(T::Hash[::String, [T.class_of(RuboCop::Cop::Base)]]) } def cop_registry; end end end -# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#48 +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#59 class RubyLsp::Requests::Support::RuboCopRunner::ConfigurationError < ::StandardError; end -# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#56 +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#61 RubyLsp::Requests::Support::RuboCopRunner::DEFAULT_ARGS = T.let(T.unsafe(nil), Array) # source://ruby-lsp/lib/ruby_lsp/requests/support/selection_range.rb#7 @@ -5029,7 +5352,7 @@ class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::R # @param symbol [Interface::DocumentSymbol] # @return [void] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def <<(*args, **_arg1, &blk); end # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#47 @@ -5051,13 +5374,13 @@ class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::R def response; end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#9 +# source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#11 class RubyLsp::ResponseBuilders::DocumentSymbol::SymbolHierarchyRoot - # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#16 + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#18 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#13 + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#15 sig { returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } def children; end end @@ -5104,30 +5427,34 @@ class RubyLsp::ResponseBuilders::SemanticHighlighting < ::RubyLsp::ResponseBuild ResponseType = type_member { { fixed: LanguageServer::Protocol::Interface::SemanticTokens } } - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#59 - sig { params(encoding: ::Encoding).void } - def initialize(encoding); end + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#64 + sig do + params( + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) + ).void + end + def initialize(code_units_cache); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#66 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#71 sig { params(location: ::Prism::Location, type: ::Symbol, modifiers: T::Array[::Symbol]).void } def add_token(location, type, modifiers = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#90 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#96 sig { returns(T.nilable(::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken)) } def last; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#81 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#87 sig { params(location: ::Prism::Location).returns(T::Boolean) } def last_token_matches?(location); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#95 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#101 sig { override.returns(T::Array[::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken]) } def response; end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#99 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#105 class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#126 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#132 sig do params( start_line: ::Integer, @@ -5139,51 +5466,51 @@ class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken end def initialize(start_line:, start_code_unit_column:, length:, type:, modifier:); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#109 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#115 sig { returns(::Integer) } def length; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#115 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#121 sig { returns(T::Array[::Integer]) } def modifier; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#143 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#149 sig { params(modifier_symbols: T::Array[::Symbol]).void } def replace_modifier(modifier_symbols); end # @raise [UndefinedTokenType] # - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#135 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#141 sig { params(type_symbol: ::Symbol).void } def replace_type(type_symbol); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#106 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#112 sig { returns(::Integer) } def start_code_unit_column; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#103 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#109 sig { returns(::Integer) } def start_line; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#112 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#118 sig { returns(::Integer) } def type; end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#153 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#159 class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticTokenEncoder - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#157 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#163 sig { void } def initialize; end # For more information on how each number is calculated, read: # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens # - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#192 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#198 sig { params(token: ::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken).returns(T::Array[::Integer]) } def compute_delta(token); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#167 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#173 sig do params( tokens: T::Array[::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken] @@ -5196,15 +5523,15 @@ class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticTokenEncoder # 0b1000000000, as :default_library is the 10th bit according # to the token modifiers index map. # - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#214 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#220 sig { params(modifiers: T::Array[::Integer]).returns(::Integer) } def encode_modifiers(modifiers); end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#38 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#40 RubyLsp::ResponseBuilders::SemanticHighlighting::TOKEN_MODIFIERS = T.let(T.unsafe(nil), Hash) -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#9 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#11 RubyLsp::ResponseBuilders::SemanticHighlighting::TOKEN_TYPES = T.let(T.unsafe(nil), Hash) # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#7 @@ -5231,21 +5558,21 @@ end # The final result of running a request before its IO is finalized # -# source://ruby-lsp/lib/ruby_lsp/utils.rb#135 +# source://ruby-lsp/lib/ruby_lsp/utils.rb#198 class RubyLsp::Result - # source://ruby-lsp/lib/ruby_lsp/utils.rb#145 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#208 sig { params(id: ::Integer, response: T.untyped).void } def initialize(id:, response:); end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#142 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#205 sig { returns(::Integer) } def id; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#139 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#202 sig { returns(T.untyped) } def response; end - # source://ruby-lsp/lib/ruby_lsp/utils.rb#151 + # source://ruby-lsp/lib/ruby_lsp/utils.rb#214 sig { returns(T::Hash[::Symbol, T.untyped]) } def to_hash; end end @@ -5256,11 +5583,19 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: Prism::ParseResult } } - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#149 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#146 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } + def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#143 + sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } + def code_units_cache; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#170 sig { override.returns(::RubyLsp::Document::LanguageId) } def language_id; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#179 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#200 sig do params( range: T::Hash[::Symbol, T.untyped], @@ -5269,7 +5604,7 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end def locate_first_within_range(range, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#213 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#234 sig do params( position: T::Hash[::Symbol, T.untyped], @@ -5278,29 +5613,29 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end def locate_node(position, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#135 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#155 sig { override.returns(T::Boolean) } def parse!; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#154 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#175 sig { returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#144 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#165 sig { override.returns(T::Boolean) } def syntax_error?; end class << self - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#32 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#35 sig do params( node: ::Prism::Node, char_position: ::Integer, - node_types: T::Array[T.class_of(Prism::Node)], - encoding: ::Encoding + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)), + node_types: T::Array[T.class_of(Prism::Node)] ).returns(::RubyLsp::NodeContext) end - def locate(node, char_position, node_types: T.unsafe(nil), encoding: T.unsafe(nil)); end + def locate(node, char_position, code_units_cache:, node_types: T.unsafe(nil)); end end end @@ -5360,7 +5695,7 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { returns(::RubyLsp::GlobalState) } def global_state; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#142 + # source://ruby-lsp/lib/ruby_lsp/server.rb#153 sig { params(include_project_addons: T::Boolean).void } def load_addons(include_project_addons: T.unsafe(nil)); end @@ -5368,200 +5703,210 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { override.params(message: T::Hash[::Symbol, T.untyped]).void } def process_message(message); end + # Process responses to requests that were sent to the client + # + # source://ruby-lsp/lib/ruby_lsp/server.rb#145 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def process_response(message); end + private - # source://ruby-lsp/lib/ruby_lsp/server.rb#1079 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1127 sig { params(id: ::String, title: ::String, percentage: ::Integer).void } def begin_progress(id, title, percentage: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1140 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1157 sig { void } def check_formatter_is_available; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#765 + # source://ruby-lsp/lib/ruby_lsp/server.rb#813 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def code_action_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1122 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1147 sig { params(id: ::String).void } def end_progress(id); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1047 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1095 sig { void } def perform_initial_indexing; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1158 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1176 sig { params(indexing_options: T.nilable(T::Hash[::Symbol, T.untyped])).void } def process_indexing_configuration(indexing_options); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1103 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1140 sig { params(id: ::String, percentage: ::Integer).void } def progress(id, percentage); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#413 + # source://ruby-lsp/lib/ruby_lsp/server.rb#456 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_combined_requests(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#177 + # source://ruby-lsp/lib/ruby_lsp/server.rb#193 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_initialize(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#296 + # source://ruby-lsp/lib/ruby_lsp/server.rb#337 sig { void } def run_initialized; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1042 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1090 sig { override.void } def shutdown; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#701 + # source://ruby-lsp/lib/ruby_lsp/server.rb#749 sig { params(document: RubyLsp::Document[T.untyped]).returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level(document); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#743 + # source://ruby-lsp/lib/ruby_lsp/server.rb#791 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_code_action(message); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def text_document_code_lens(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#830 + # source://ruby-lsp/lib/ruby_lsp/server.rb#878 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#855 + # source://ruby-lsp/lib/ruby_lsp/server.rb#903 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion_item_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#900 + # source://ruby-lsp/lib/ruby_lsp/server.rb#948 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_definition(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#790 + # source://ruby-lsp/lib/ruby_lsp/server.rb#838 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_diagnostic(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#377 + # source://ruby-lsp/lib/ruby_lsp/server.rb#420 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_change(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#361 + # source://ruby-lsp/lib/ruby_lsp/server.rb#404 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_close(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#321 + # source://ruby-lsp/lib/ruby_lsp/server.rb#364 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_open(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#599 + # source://ruby-lsp/lib/ruby_lsp/server.rb#647 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_document_highlight(message); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def text_document_document_link(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def text_document_document_symbol(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11589lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11647lib/types/private/methods/_methods.rb#257 def text_document_folding_range(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#560 + # source://ruby-lsp/lib/ruby_lsp/server.rb#603 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#638 + # source://ruby-lsp/lib/ruby_lsp/server.rb#686 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_hover(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#709 + # source://ruby-lsp/lib/ruby_lsp/server.rb#757 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_inlay_hint(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#615 + # source://ruby-lsp/lib/ruby_lsp/server.rb#663 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_on_type_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#984 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1032 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_type_hierarchy(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#532 + # source://ruby-lsp/lib/ruby_lsp/server.rb#575 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_range_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#683 + # source://ruby-lsp/lib/ruby_lsp/server.rb#731 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_references(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#663 + # source://ruby-lsp/lib/ruby_lsp/server.rb#711 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_rename(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#387 + # source://ruby-lsp/lib/ruby_lsp/server.rb#430 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_selection_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#478 + # source://ruby-lsp/lib/ruby_lsp/server.rb#521 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_delta(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#457 + # source://ruby-lsp/lib/ruby_lsp/server.rb#500 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_full(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#503 + # source://ruby-lsp/lib/ruby_lsp/server.rb#546 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#965 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1013 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_show_syntax_tree(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#874 + # source://ruby-lsp/lib/ruby_lsp/server.rb#922 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_signature_help(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1012 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1060 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_subtypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1003 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1051 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_supertypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1019 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1217 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def window_show_message_request(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#1067 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_dependencies(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#925 + # source://ruby-lsp/lib/ruby_lsp/server.rb#973 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_did_change_watched_files(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#952 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1000 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_symbol(message); end end # source://ruby-lsp/lib/ruby_lsp/store.rb#5 class RubyLsp::Store - # source://ruby-lsp/lib/ruby_lsp/store.rb#20 + # source://ruby-lsp/lib/ruby_lsp/store.rb#17 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/store.rb#122 + # source://ruby-lsp/lib/ruby_lsp/store.rb#118 sig do type_parameters(:T) .params( @@ -5572,53 +5917,53 @@ class RubyLsp::Store end def cache_fetch(uri, request_name, &block); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#88 + # source://ruby-lsp/lib/ruby_lsp/store.rb#84 sig { void } def clear; end - # source://ruby-lsp/lib/ruby_lsp/store.rb#17 + # source://ruby-lsp/lib/ruby_lsp/store.rb#14 sig { returns(::String) } def client_name; end # @return [String] # - # source://ruby-lsp/lib/ruby_lsp/store.rb#17 + # source://ruby-lsp/lib/ruby_lsp/store.rb#14 def client_name=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#98 + # source://ruby-lsp/lib/ruby_lsp/store.rb#94 sig { params(uri: ::URI::Generic).void } def delete(uri); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#108 + # source://ruby-lsp/lib/ruby_lsp/store.rb#104 sig { params(block: T.proc.params(uri: ::String, document: RubyLsp::Document[T.untyped]).void).void } def each(&block); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#93 + # source://ruby-lsp/lib/ruby_lsp/store.rb#89 sig { returns(T::Boolean) } def empty?; end - # source://ruby-lsp/lib/ruby_lsp/store.rb#14 + # source://ruby-lsp/lib/ruby_lsp/store.rb#11 sig { returns(T::Hash[::Symbol, ::RubyLsp::RequestConfig]) } def features_configuration; end # @return [Hash{Symbol => RequestConfig}] # - # source://ruby-lsp/lib/ruby_lsp/store.rb#14 + # source://ruby-lsp/lib/ruby_lsp/store.rb#11 def features_configuration=(_arg0); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#37 + # source://ruby-lsp/lib/ruby_lsp/store.rb#33 sig { params(uri: ::URI::Generic).returns(RubyLsp::Document[T.untyped]) } def get(uri); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#103 + # source://ruby-lsp/lib/ruby_lsp/store.rb#99 sig { params(uri: ::URI::Generic).returns(T::Boolean) } def key?(uri); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#83 + # source://ruby-lsp/lib/ruby_lsp/store.rb#79 sig { params(uri: ::URI::Generic, edits: T::Array[T::Hash[::Symbol, T.untyped]], version: ::Integer).void } def push_edits(uri:, edits:, version:); end - # source://ruby-lsp/lib/ruby_lsp/store.rb#71 + # source://ruby-lsp/lib/ruby_lsp/store.rb#67 sig do params( uri: ::URI::Generic, @@ -5629,15 +5974,6 @@ class RubyLsp::Store ).returns(RubyLsp::Document[T.untyped]) end def set(uri:, source:, version:, language_id:, encoding: T.unsafe(nil)); end - - # source://ruby-lsp/lib/ruby_lsp/store.rb#11 - sig { returns(T::Boolean) } - def supports_progress; end - - # @return [Boolean] - # - # source://ruby-lsp/lib/ruby_lsp/store.rb#11 - def supports_progress=(_arg0); end end # source://ruby-lsp/lib/ruby_lsp/store.rb#8 @@ -5725,7 +6061,7 @@ end # This condition must remain even after support for 3.4 has been dropped for users that have # `uri` in their lockfile, decoupling it from the ruby version. # -# source://ruby-lsp/lib/core_ext/uri.rb#9 +# source://ruby-lsp/lib/core_ext/uri.rb#11 URI::Generic::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) # Must be kept in sync with the one in Tapioca @@ -5736,7 +6072,7 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://tapioca/0.16.3lib/tapioca/helpers/source_uri.rb#55 + # source://tapioca/0.16.4lib/tapioca/helpers/source_uri.rb#55 sig { returns(T.nilable(::String)) } def gem_name; end @@ -5744,7 +6080,7 @@ class URI::Source < ::URI::File sig { returns(T.nilable(::String)) } def gem_version; end - # source://tapioca/0.16.3lib/tapioca/helpers/source_uri.rb#60 + # source://tapioca/0.16.4lib/tapioca/helpers/source_uri.rb#60 sig { returns(T.nilable(::String)) } def line_number; end