Improve the user experience with disabled sourcehut grammars #11258
Labels
A-documentation
Area: Documentation improvements
A-language-support
Area: Support for programming/text languages
C-enhancement
Category: Improvements
Helix has tree-sitter grammars for languages
hare
,wren
, andgemini
, but they are disabled by default inlanguages.toml
, because of unreliability issues with their repositories (see #9316):I was not getting syntax highlighting for
hare
files and it took me quite a while to discover that this was the reason.I would propose the following changes to make this fact easier to discover:
Fix the corresponding documentation of the
use-grammars
config key, because that currently says "When omitted, all grammars are fetched and built".I would replace this with some note along the lines of "The default configuration disables the languages
hare
,wren
, andgemini
because of a larger reliability and trust problem with the grammar repositories."In the pull request that made the change, the reasoning included the argument that “it is not hard to reenable them”. When I tried to do that in my user config, I noticed that apparently,
was not sufficient to re-enable all languages, as the exception list of the user config gets appended to the default config's list (it doesn't replace the default config's list).
Instead, it is necessary (?) to configure either an
only
list with all languages, or configureand then run
hx --grammar fetch && hx --grammar build
to build these three languages, and then you can comment that line again to re-enable all other grammars.I would suggest some possibility of overwriting the
use-grammars
default config, without having to explicitly specify all languages. Or maybe this is already possible?It would also be great if
helix --health
andhelix --grammar
would report disabled grammars to the user in some way.I was really confused because
helix --health
told me my language had highlight queries, even if nothing was highlighted.I could try to prepare pull requests if you would support these changes?
The text was updated successfully, but these errors were encountered: