From 2ce744b6f5ad38adfb081b2785a65ac334a9515a Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:19:40 -0500 Subject: [PATCH] Update shim --- lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb | 7 ------- sorbet/rbi/shims/ruby_lsp.rbi | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb b/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb index b312807a..4925e28c 100644 --- a/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb +++ b/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb @@ -6,13 +6,6 @@ module Rails class IndexingEnhancement < RubyIndexer::Enhancement extend T::Sig - sig { params(listener: RubyIndexer::DeclarationListener).void } - def initialize(listener) - super - # We need this to prevent Sorbet from complaining that @listener is undeclared - @listener = listener - end - sig do override.params( call_node: Prism::CallNode, diff --git a/sorbet/rbi/shims/ruby_lsp.rbi b/sorbet/rbi/shims/ruby_lsp.rbi index ca6957d2..7e5eacc9 100644 --- a/sorbet/rbi/shims/ruby_lsp.rbi +++ b/sorbet/rbi/shims/ruby_lsp.rbi @@ -4,8 +4,8 @@ module RubyIndexer class Enhancement # If we change ruby-lsp to use a `T.let` then this can be removed - def initialize(index) - @index = T.let(index, RubyIndexer::Index) + def initialize(listener) + @listener = T.let(listener, RubyIndexer::DeclarationListener) end end end