vscode-rust
vscode-rust copied to clipboard
Suggestion: Add a "delay" option when linting with RLS
Version of VSCode: 1.13.0 Version of the extension: 0.3.14 OS: Windows 10
Description:
If I'm not mistaken, the RLS linting is called whenever a key is pressed in the editor. This brings two issues:
1: RLS returns when I'm still typing and it gives wrong results. 2: When I start typing, there is always 1 core that is used at 100%, and my cpu don't like it (very noticeable on my weak laptop / barely noticeable on my tower).
Allowing a delay in ms in the configuration would fix these issues. For example, if I set the delay to 1000 ms, source linting will only be called after I stopped typing for 1 sec.
Example:
"rust.rls": {
"linting_delay": 1000,
}
@nrc, @jonathanturner I suppose currently it is half a second: https://github.com/rust-lang-nursery/rls/blob/master/src/build.rs#L108 Could you help me with that I am not aware of RLS internals.
I filed https://github.com/rust-lang-nursery/rls/issues/364 for this, it is a good suggestion.
Thank you.