diff --git a/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb b/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb index 5fd88904..d0aca528 100644 --- a/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb +++ b/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb @@ -6,12 +6,6 @@ module Rails class IndexingEnhancement < RubyIndexer::Enhancement extend T::Sig - sig { params(index: RubyIndexer::Index).void } - def initialize(index) - super - @index = index - end - sig do override.params( owner: T.nilable(RubyIndexer::Entry::Namespace), diff --git a/sorbet/rbi/shims/ruby_lsp.rbi b/sorbet/rbi/shims/ruby_lsp.rbi new file mode 100644 index 00000000..ca6957d2 --- /dev/null +++ b/sorbet/rbi/shims/ruby_lsp.rbi @@ -0,0 +1,11 @@ +# typed: strict +# frozen_string_literal: true + +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) + end + end +end