-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a spell checker to rust-analyzer #14597
Comments
Almost every IDE has a built-in spell checker. For example, for VSCode: It does the job really well and I use it in every single project. |
That's not the same, the spell checker that you linked is a "simple" checker. Also performance wise it is slower then one integrated inside r-a that would know what to check only. I invite you to read the discussion #14389 if you are curious about the benefits to spell check in the LSP. |
I don't know how relevant this is but on neovim people usually rely on Tree-sitter to identify code sections where spell checking should be enabled (comments, docstrings, etc.). Let's take the following example: fn main() {
some_func(
arg1,
arg2, // I want the spelcheker to be working even if I'm not done with the code yet
} Would rust-analyzer still be able to pick up the fact that this is a comment where spellchecking should be enabled ? Even if the code is not valid yet ? This is probably a bad example, but you get my point (fun fact: GitHub uses Tree-sitter to highlight the Rust code above) |
@ShellCode33 while probably not as fast as tree-sitter, rust-analyzer does support incremental parsing and has a real understanding of the code, unlike the TextMate grammars you might have encountered before. If you give it a try, you'll find out that it does supports incomplete code like the one you've shown. So yes, it knows where the comments are. |
Discussed in #14389
Originally posted by GilShoshan94 March 22, 2023
Hi,
Now, we have a code formater with
rustfmt
, we have a linter withcargo check
orcargo clippy
, why not a spell checker?....
Quoted from #14389 (comment)
The text was updated successfully, but these errors were encountered: