How to manualy trigger ra cargo check via hotkey #18925
Replies: 1 comment 1 reply
-
Zed has tasks, which allow running relatively arbitrary scripts inside the project/other directory: you could create your own or use the ones provided by rust integration. https://zed.dev/docs/tasks#custom-keybindings-for-tasks shows how to add a keybindings on top "cargo check on every second" are the defaults of rust-analyzer (see https://zed.dev/docs/languages/rust#large-projects-and-performance mentions how to disable cargo check entirely, so you can use tasks (and cmd+click in the terminal) to fix errors continuously. |
Beta Was this translation helpful? Give feedback.
-
Check for existing issues
Describe the feature
I can't find how to do a cargo check on save, but triggered by a hotkey. This is critically important for a laptop to avoid consuming too much battery on rechecks for every save. A regular spawn task is not what I need because it doesn't highlight the syntax in the code itself.
for example code like
let int: u32 = "strrrrrr";
won't be underlined with red line unless cargo check was run. Maybe it's possible to add some debounce so cargo check won't be running every second?
If applicable, add mockups / screenshots to help present your vision of the feature
No response
Beta Was this translation helpful? Give feedback.
All reactions