Sorbet LSP sublime text read typed: false

219 views Asked by At

So I'm using LSP and Sorbet with Sublime Text 3. I have an issue in my RSpec files that have typed: false in them. The engine spits out tons of type errors:

5:3   error   Method `it` does not exist on `T.class_of(<root>)` ​unknown-source:
6:5   error   Method `expect` does not exist on `T.class_of(<root>)` (fix available) ​unknown-source:
7:11  error   Method `be_a` does not exist on `T.class_of(<root>)` ​unknown-source:

It's inside a RSpec.describe block. Is there a way to make LSP not to run on typed: false or even better, is there a way to let Sorbet know these methods exists?

I use:

sorbet
sorbet-runtime

I've tried adding rspec-sorbet aswell but didn't help.

Note: I've also run srb rbi gems.

0

There are 0 answers