Repository: helix-editor/helix (language: rust)

Issue:
Document the different diagnostic levels
In https://github.com/helix-editor/helix/blob/master/book/src/editor.md , I could not find a documentation for the valid diagnostic levels; for example, in section

https://github.com/helix-editor/helix/blob/af7a1fd20c0a2915e0dae1b5bea7cb6bde6c2746/book/src/editor.md?plain=1#L399-L435

it is not clear to me, reading just this section, what values are ok to use for e.g. `cursor-line` .


Discussion / hints:
Ok, after a bit of digging I could find this information at:

https://github.com/helix-editor/helix/blob/af7a1fd20c0a2915e0dae1b5bea7cb6bde6c2746/book/src/languages.md?plain=1#L63

not sure how this could be made easier to find? It was a bit of digging to find it. Should we add "see `diagnostic-severity` for admissible values", or "(Allowed values: `Error`, `Warning`, `Info`, `Hint`)", or something like this? Not sure how to document this effectively without putting the same boilerplate text again and again.
I think we can add a paragraph below the table in this section that says that the allowed values are `"hint"`, `"info"`, `"warning"` and `"error"`. I think it would be ok to reference some other config option for `config.toml` but linking to the `languages.toml` config could be confusing. Also that section in `languages.md` is incorrect about the levels: it should be lowercase "hint"/"info"/etc. instead of "Hint"/"Info"/etc.

Fix patch:
diff --git a/book/src/editor.md b/book/src/editor.md
index 1f70c5b5b68e..feec09fd0e34 100644
--- a/book/src/editor.md
+++ b/book/src/editor.md
@@ -442,6 +442,8 @@ fn main() {
 | `max-wrap` | Equivalent of the `editor.soft-wrap.max-wrap` option for diagnostics.  | `20` |
 | `max-diagnostics` | Maximum number of diagnostics to render inline for a given line  | `10` |
 
+The allowed values for `cursor-line` and `other-lines` are: `error`, `warning`, `info`, `hint`.
+
 The (first) diagnostic with the highest severity that is not shown inline is rendered at the end of the line (as long as its severity is higher than the `end-of-line-diagnostics` config option):
 
 ```
diff --git a/book/src/languages.md b/book/src/languages.md
index a70b4789158b..0190bb44297b 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -60,7 +60,7 @@ These configuration keys are available:
 | `shebangs`            | The interpreters from the shebang line, for example `["sh", "bash"]` |
 | `roots`               | A set of marker files to look for when trying to find the workspace root. For example `Cargo.lock`, `yarn.lock` |
 | `auto-format`         | Whether to autoformat this language when saving               |
-| `diagnostic-severity` | Minimal severity of diagnostic for it to be displayed. (Allowed values: `Error`, `Warning`, `Info`, `Hint`) |
+| `diagnostic-severity` | Minimal severity of diagnostic for it to be displayed. (Allowed values: `error`, `warning`, `info`, `hint`) |
 | `comment-tokens`      | The tokens to use as a comment token, either a single token `"//"` or an array `["//", "///", "//!"]` (the first token will be used for commenting). Also configurable as `comment-token` for backwards compatibility|
 | `block-comment-tokens`| The start and end tokens for a multiline comment either an array or single table of `{ start = "/*", end = "*/"}`. The first set of tokens will be used for commenting, any pairs in the array can be uncommented |
 | `indent`              | The indent to use. Has sub keys `unit` (the text inserted into the document when indenting; usually set to N spaces or `"\t"` for tabs) and `tab-width` (the number of spaces rendered for a tab) |


Test patch: