admin管理员组文章数量:1312732
I'm trying Zed editor to develop Rust project and it work perfectly except one annoying thing: I can't configure Rust Analyzer to run checks when I type, like it does in VS Code. In Zed Rust Analyzer re-checks only on save and I can't find anywhere how to configure it to do this on the fly when I type. Anybody knows how to do this?
I'm trying Zed editor to develop Rust project and it work perfectly except one annoying thing: I can't configure Rust Analyzer to run checks when I type, like it does in VS Code. In Zed Rust Analyzer re-checks only on save and I can't find anywhere how to configure it to do this on the fly when I type. Anybody knows how to do this?
Share Improve this question asked Feb 1 at 10:37 yesintyesint 2131 silver badge11 bronze badges 2- Are you sure that's what it does in VS Code? My VS Code also only updates on save. Maybe there's a config option I don't know about though. – Finomnis Commented Feb 1 at 14:48
- 1 rust-analyzer only has check on save, although maybe you had autosave enabled. – Chayim Friedman Commented Feb 1 at 16:47
1 Answer
Reset to default 1Checking, as in cargo check
, which runs the compiler to obtain diagnostics, can only run against saved files — there is no protocol by which rust-analyzer can give Cargo unsaved files. However, rust-analyzer also has a subset of diagnostics implemented internally which are able to update as you type. These diagnostics largely attempt to mimic rustc diagnostics, though they are marked as being from rust-analyzer (at least in VS Code; I don’t use Zed myself).
rust-analyzer built-in diagnostics are controlled by the settings named rust-analyzer.diagnostics.*
. Check to make sure you don’t have them disabled.
本文标签: How to make Rust Analyzer to check when you type in ZedStack Overflow
版权声明:本文标题:How to make Rust Analyzer to check when you type in Zed? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741879409a2402657.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论