helix
helix copied to clipboard
Invalid key code 'diagnostics' when trying to set end-of-line-diagnostics according to
I am setting my config similar to:
https://github.com/helix-editor/helix/blob/af7a1fd20c0a2915e0dae1b5bea7cb6bde6c2746/book/src/editor.md?plain=1#L432-L434
by appending this snippet at the end of my config. However, I then get the following error:
Bad config: TOML parse error at line 40, column 1
|
40 | end-of-line-diagnostics = "hint"
| ^^^^^^^^^^^^^^^^^^^^^^^
Invalid key code 'diagnostics'
Press <ENTER> to continue with default config
commenting out the first line, i.e. appending
# end-of-line-diagnostics = "hint"
[editor.inline-diagnostics]
cursor-line = "warning"
works fine; should the end-of-line-diagnostics be set in another way somehow? :)
kzm@kzm-bpq:~$ hx --version
helix 24.7 (af7a1fd2)
kzm@kzm-bpq:~$ hx --health
Config file: /home/kzm/.config/helix/config.toml
Language file: default
Log file: /home/kzm/.cache/helix/helix.log
Runtime directories: /home/kzm/.config/helix/runtime;/home/kzm/Desktop/Software/helix/runtime;/home/kzm/.cargo/bin/runtime
Runtime directory is empty: /home/kzm/.cargo/bin/runtime
Clipboard provider: wl-paste+wl-copy
System clipboard provider: wl-paste+wl-copy
...
Ok, the trick is that end-of-line-diagnostics = "hint" should be part of the [editor] section; I wonder if this could be documented better in the snippet provided? (it is documented in the [editor] section, but this is quite a bit away from the example snippet).
I.e. what about updating the documentation snippet to be:
end-of-line-diagnostics = "hint" # NOTE: this must be part of the [editor] section, put it at the good location in the config!
[editor.inline-diagnostics]
cursor-line = "warning" # show warnings and errors on the cursorline inline
(if you think this is an ok note to add I can open a PR to push this :) ).
Since we don't have any other config in that block I think it would make sense to add the [editor] above that line, i.e.:
[editor]
end-of-line-diagnostics = "hint"
[editor.inline-diagnostics]
cursor-line = "warning" # show warnings and errors on the cursorline inline
We can also switch that codefence to use ```toml to get TOML syntax highlighting like the rest of the config snippets. Feel free to open up a PR
what sould be the fix for this? i do have the
[editor]
mouse = true
bufferline = "multiple"
popup-border = "all"
true-color = true
color-modes = true
auto-pairs = true
end-of-line-diagnostics = "hint"
in the main editor section and it doesn't work