From 0e7d757869bbae914a7e832e2511c2071eeacee5 Mon Sep 17 00:00:00 2001 From: Matouš Dzivjak Date: Sat, 25 Dec 2021 06:32:43 +0100 Subject: 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--- helix-core/src/indent.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'helix-core/src/indent.rs') diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs index b6f5081a..c2baf3cc 100644 --- a/helix-core/src/indent.rs +++ b/helix-core/src/indent.rs @@ -442,6 +442,7 @@ where ); let doc = Rope::from(doc); + use crate::diagnostic::Severity; use crate::syntax::{ Configuration, IndentationConfiguration, LanguageConfiguration, Loader, }; @@ -459,6 +460,7 @@ where roots: vec![], comment_token: None, auto_format: false, + diagnostic_severity: Severity::Warning, language_server: None, indent: Some(IndentationConfiguration { tab_width: 4, -- cgit v1.2.3-70-g09d2