aboutsummaryrefslogtreecommitdiff
path: root/book
diff options
context:
space:
mode:
authorMatouš Dzivjak2021-12-25 05:32:43 +0000
committerGitHub2021-12-25 05:32:43 +0000
commit0e7d757869bbae914a7e832e2511c2071eeacee5 (patch)
tree5782bf901ef64ad629ce48b56085e8d1ae1f992a /book
parent60f3225c7f3375b546e8ec9032739d073a7c363c (diff)
feat(lsp): configurable diagnostic severity (#1325)
* feat(lsp): configurable diagnostic severity Allow severity of diagnostic messages to be configured. E.g. allow turning of Hint level diagnostics. Fixes: https://github.com/helix-editor/helix/issues/1007 * Use language_config() method * Add documentation for diagnostic_severity * Use unreachable for unknown severity level * fix: documentation for diagnostic_severity config
Diffstat (limited to 'book')
-rw-r--r--book/src/guides/adding_languages.md25
-rw-r--r--book/src/languages.md1
2 files changed, 13 insertions, 13 deletions
diff --git a/book/src/guides/adding_languages.md b/book/src/guides/adding_languages.md
index 987ad088..5844a48e 100644
--- a/book/src/guides/adding_languages.md
+++ b/book/src/guides/adding_languages.md
@@ -27,18 +27,19 @@ directory](../configuration.md).
These are the available keys and descriptions for the file.
-| Key | Description |
-| ---- | ----------- |
-| name | The name of the language |
-| scope | A string like `source.js` that identifies the language. Currently, we strive to match the scope names used by popular TextMate grammars and by the Linguist library. Usually `source.<name>` or `text.<name>` in case of markup languages |
-| injection-regex | regex pattern that will be tested against a language name in order to determine whether this language should be used for a potential [language injection][treesitter-language-injection] site. |
-| file-types | The filetypes of the language, for example `["yml", "yaml"]` |
-| 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 |
-| comment-token | The token to use as a comment-token |
-| indent | The indent to use. Has sub keys `tab-width` and `unit` |
-| config | Language server configuration |
+| Key | Description |
+| ---- | ----------- |
+| name | The name of the language |
+| scope | A string like `source.js` that identifies the language. Currently, we strive to match the scope names used by popular TextMate grammars and by the Linguist library. Usually `source.<name>` or `text.<name>` in case of markup languages |
+| injection-regex | regex pattern that will be tested against a language name in order to determine whether this language should be used for a potential [language injection][treesitter-language-injection] site. |
+| file-types | The filetypes of the language, for example `["yml", "yaml"]` |
+| 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`) |
+| comment-token | The token to use as a comment-token |
+| indent | The indent to use. Has sub keys `tab-width` and `unit` |
+| config | Language server configuration |
## Queries
diff --git a/book/src/languages.md b/book/src/languages.md
index cef61501..4c4dc326 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -11,4 +11,3 @@ Changes made to the `languages.toml` file in a user's [configuration directory](
name = "rust"
auto-format = false
```
-