helix
helix copied to clipboard
Make it clearer in --health what is controlled by the user and what is not
Describe your feature request
As can be seen by this issue #3177, it is not clear from the health output what issues can be addressed by the user, for example installing the proper language server, and what is just the current state of support in helix, i.e. support for indent/textobject queries.
This distinction should be made clearer, both in helix --health
, the table for all languages, and in helix --health some-lang
, for a specific language.
I'm definitely open to suggestions on this but I don't have any ideas for conveying that info tersely. We could use more icons but then the icon meaning might become unintuitve/ambiguous. Surely that info can live in the wiki page for the health check (here) and then maybe the health check command should link out to the wiki page? IMO hx --health
itself dumping out a wall of prose in the terminal seems like a bad experience
Hello, here to upvote the OP: I read over the docs for language support, and I know to use --health <LANG>
and initially I just focused on getting LSP support working for key languages.
However, when I began editing YAML I found that the syntax highlighting seemed crude, and I thought I must not have syntax support, then I ran hx --health yaml
and realized I didn't understand the output well, and I realized I had a slew of questions based on this output:
$ hx --health yaml
Configured language server: yaml-language-server
Binary for language server: 'yaml-language-server' not found in $PATH
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✓
First, the two things I do understand are: I don't have yaml-language-server
installed and there's no "debug" support (though not sure what that would mean for YAML).
But here are things I didn't (or still don't) understand:
- Is the syntax highlighting in my case correctly working and just a bad theme/color palette for my taste/preferences?
- Is syntax highlighting for YAML not working, and it's falling back on a crude generic delimiter-only coloring? (I believe vim/emacs do this.)
- Does LSP support affect syntax highlighting in any way?
- What do "highlight queries, TextObject queries, indent queries" from the health check actually mean?
I found this ticket and found the wiki link which was more helpful, so now I believe I do have syntax highlighting for YAML and it just doesn't fit my taste. (Specifically, values are the same color as keys regardless of any quoting used.)
I consider my uncertainty a UX snag that can be improved. Yes, a subset of users can figure everything out if they study a variety of sources enough, but wouldn't it work better if a larger set of users got the right information directly from simply using hx
?
I would prioritize user-education sources in this order:
- In-band feedback while using
hx
. - The output of
hx
commandline (such as--health
) - The docs on https://docs.helix-editor.com/ (Tangent: I personally highly prioritize offline dev, so I build and open the mdbook locally, fwiw).
- Github discussions and tickets.
I personally don't value github wikis. Why have yet a fifth location to look up information? Why isn't the wiki information in the main docs? I would not have discovered the wiki link if not for this ticket.
Recommendation:
Given the "sources of information priorities" above, here's what I would recommend:
- Rename "Highlight queries" in user-facing output to "syntax highlighting". (I couldn't tell if "highlight queries" meant something about some kind of editor query like searching or jump-to-definition, etc… and I believe "syntax highlighting" is more broadly understood.)
- Rename "TextObject queries" to something like "Language-aware navigation (jump-to-definition, etc…)". This one is admittedly harder to clearly describe.
- Rename "Indent queries" to "auto-formatting". I'm actually uncertain if
Indent queries
means both adjusting the cursor as I edit and formatting on save or not, so the description should reflect whether that's either or both of these. - Display in-band while editing any file when certain features are unavailable on the status bar, e.g. "⚠ language features misconfigured" with some way to pop open online health in-band. Perhaps from the space menu.
Thoughts?
I realize this is pretty opinionated, especially the renaming. Maybe the last recommendation is the most likely to be desired by devs and users alike? That might be a fun PR if I had time to hack on hx
. ;-)