A language server to spellcheck code using different stategies
-
Build the project using
cargo build
-
Add the built binary to your
PATH
fish
:set -gax PATH (realpath ./target/debug)
bash
:PATH=$PATH:$(realpath target/debug)
-
Change directory to
./examples/helix
and play with the two files in there
- Only Rust files have a custom tree-sitter fragmentizer, other use a dumb(-ish) fragmentizer (works fine though).
- Only supports
ruspell
as a spellchecking backend ruspell
doesn't implement custom dictionaries so the "Saving to a custom dictionary" code action is a no-op.
ls
space
-
waits for
on_change
events and passes the whole source towordc
's Checker -
send diagnostics to the client and listens to code actions events
wordc
space
-
checker: combines a fragment processor with a spellchecking provider, uses the tokens spit out of the processor to feed the spellchecker and provide diagnostics.
-
fragment processor: parses source code into text fragments of different kind, uses a fragmentizer.
-
Rust
fragmentizer is implemented with tree-sitter and a query to select idents and comments -
a
Dumb
fallback fragmentizer skips non-alphanumeric characters
-
-
fragmentizer: depends on the language. uses domain knowledge to fragment source code and avoid keyword.
-
spellchecking provider: takes tokens and spellcheck them
-
only tokens as of today are
Word
s -
is though to be be extended to support full
Sentences
to pass to tools like LanguageTool.
-
This work is licensed under CeCILL-2.1
, a strong copyleft French OSS license. This license allows modification and distribution of the software while requiring the same license for derived works.