summaryrefslogtreecommitdiff
path: root/helix-core/src/syntax.rs
diff options
context:
space:
mode:
authorMatouš Dzivjak2021-12-25 05:32:43 +0000
committerGitHub2021-12-25 05:32:43 +0000
commit0e7d757869bbae914a7e832e2511c2071eeacee5 (patch)
tree5782bf901ef64ad629ce48b56085e8d1ae1f992a /helix-core/src/syntax.rs
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 'helix-core/src/syntax.rs')
-rw-r--r--helix-core/src/syntax.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index ef35fc75..cdae0210 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -1,5 +1,6 @@
use crate::{
chars::char_is_line_ending,
+ diagnostic::Severity,
regex::Regex,
transaction::{ChangeSet, Operation},
Rope, RopeSlice, Tendril,
@@ -63,6 +64,8 @@ pub struct LanguageConfiguration {
#[serde(default)]
pub auto_format: bool,
+ #[serde(default)]
+ pub diagnostic_severity: Severity,
// content_regex
#[serde(default, skip_serializing, deserialize_with = "deserialize_regex")]