helix
helix copied to clipboard
Improve appearance of diagnostics messages
A few opinions:
- The diagnostic messages need a right margin. It looks awful with characters on the edge.
- Distinct diagnostic messages need a margin between them to indicate the messages are separate.
- The maximum width of the area for messages needs to be significantly smaller. Long messages are hard to read when wrapped.
- The messages need to be left aligned.
This is better:
4. The messages need to be left aligned.
The design was based on lsp-mode which right aligns: https://emacs-lsp.github.io/lsp-mode/
The diagnostic messages need a right margin. It looks awful with characters on the edge.
Distinct diagnostic messages need a margin between them to indicate the messages are separate.
That consumes more space on the UI though, the diagnostics area is already way too big on a smaller terminal.
3. The maximum width of the area for messages needs to be significantly smaller. Long messages are hard to read when wrapped.
I already downsized this from 120 to 100 which was the lsp-mode default. 60 is even smaller than what used to be the code wrapping standard at 80. It works well if the diagnostic is mostly text, but wrapping code samples over several lines is a lot harder for me to read.
-
The link to emacs screen shot at least has the right margin. Surely we can at least change that.
-
As for the space between messages, if space is more important than readability, then let's not add the additional space in there.
Which language and scenario will produce diagnostic messages with that much code? I'd expect right-aligned code to be hard to read.
This is better: <the above image>
@twharmon Excuse me for the unrelated question, but how did you set up the mode names down in the statusline to their full form?
This is better:
@twharmon Excuse me for the unrelated question, but how did you set up the mode names down in the statusline to their full form?
@Manosmer
[editor.statusline]
mode.normal = "NORMAL"
mode.insert = "INSERT"
mode.select = "SELECT"
I think having the mode names in full looks much better, so I started a poll to see what people think: https://github.com/helix-editor/helix/discussions/4589
Thanks @twharmon for the PR.
The left vs right alignment and the addition space for readability vs not can all be made configurable.
As @archseer mentioned the case of smaller displays, they can go with compact mode and people with larger monitors can go for easy fit. The Diagnostic messages today are very hard to read.
@archseer Any new thoughts on this?
I have a branch with this config possible:
[editor.diagnostics]
top-margin = 1
right-margin = 0
width = 100
height = 15
Perhaps adding align
as well would help.