How should spellchecking look in Helix? #14085
Replies: 4 comments 6 replies
-
The most direct inspiration will probably come from a language server and plugin for the Zed editor Codebook which uses Spellbook and Tree-sitter for spell checking. This should give good insight into how Tree-sitter queries should look and what needs to be configurable. #3637 has a lot of prior discussion about using Tree-sitter to tag the ranges of text which should be checked. We shouldn't ever check keywords for example but we should maybe check function names. I know that Neovim mixes in captures for spellchecking with their highlight queries and typically only tags comments. Codebook has queries which tag different nodes with captures that correspond to different parsing schemes for running the spellchecker, like |
Beta Was this translation helpful? Give feedback.
-
I update a What we will most likely need implementation-wise is the ability to create diagnostics and code actions belonging to the editor. Code actions are simpler: they can move to |
Beta Was this translation helpful? Give feedback.
-
Kakoune has a |
Beta Was this translation helpful? Give feedback.
-
I've been using harper-ls. The most annoying part is you need to add this as a language LSP for every language you want spelling enabled. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is intended to be a more open-ended offshoot of #11660.
Spellbook works and it's pretty quick. I've been running a very hacky change in my daily-driver branch for a while now. That patch spots typos in the code within the viewport at rendering time and draws squiggly lines under them. Not very fancy but it's obvious when there's an error.
What I'm wondering is how the "proper" version of the feature should look. Mainly I'm concerned that it will be obtrusive and annoying since code is often full of little abbreviations. When should spellchecking occur, what text should be checked and how should mistakes be presented? Other parts of the feature seem straightforward: if the cursor is over a spelling mistake,
C-a
(code action menu) should make suggestions which replace the typo when accepted.In this discussion I'd like to document other editor's behaviors and field opinions.
Beta Was this translation helpful? Give feedback.
All reactions