4 ms·
> it kind of falls apart I'd like to point out that the editor is barely a year old and I'm working on it entirely during my free time. It takes time to sort o
by archseer 4y ago
> it kind of falls apart
I'd like to point out that the editor is barely a year old and I'm working on it entirely during my free time. It takes time to sort out all the issues and provide excellent support for all languages. I primarily write Rust and Go so those are guaranteed to work well.
It's hard to do tree-sitter query based indentation with space based languages, because the indent has semantic meaning and the AST node is invalid until indentation is typed out. We do have a potential solution (https://github.com/helix-editor/helix/issues/763#issuecomment-1137894973= https://github.com/helix-editor/helix/issues/763#issuecommen...), it just needs someone to go and implement it.
I don't consider tree-sitter niche though. Outside of VSCode it's widely adopted, but yes it's probably too soon to only rely on tree-sitter with no fallback. Of course we do implement fallback behaviours too: we try to use tree-sitter first, then provide a simpler fallback for cases where there's no grammar available (or like in this case, it's not a great fit).
Edit: this has prompted me to switch python to the fallback algorithm for now https://github.com/helix-editor/helix/commit/9ae70cc410bd042b5cf119c571db323436caf08b https://github.com/helix-editor/helix/commit/9ae70cc410bd042...