冰糕LSP崇高文本读取键入:false

发布于 2025-01-26 08:57:59 字数 631 浏览 4 评论 0原文

因此,我将LSP和冰糕带有崇高的文本3。我的RSPEC文件中有一个问题,其中键入:false中的。引擎吐出了很多类型错误:

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:

它在rspec.describe block中。有没有办法使LSP不在打字上运行:错误甚至更好,是否有一种方法让冰糕知道这些方法存在?

我使用:

sorbet
sorbet-runtime

我尝试添加rspec-sorbet同样有帮助。

注意:我还运行srb rbi gems

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文