Skip to content

Commit

Permalink
Update shim
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Nov 21, 2024
1 parent d6c4f17 commit 2ce744b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions sorbet/rbi/shims/ruby_lsp.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2ce744b

Please sign in to comment.