Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/editor.rs')
| -rw-r--r-- | helix-view/src/editor.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 1708b3b4..26dea3a2 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -421,7 +421,9 @@ pub fn get_terminal_provider() -> Option<TerminalConfig> { pub struct LspConfig { /// Enables LSP pub enable: bool, - /// Display LSP progress messages below statusline + /// Display LSP messagess from $/progress below statusline + pub display_progress_messages: bool, + /// Display LSP messages from window/showMessage below statusline pub display_messages: bool, /// Enable automatic pop up of signature help (parameter hints) pub auto_signature_help: bool, @@ -439,7 +441,8 @@ impl Default for LspConfig { fn default() -> Self { Self { enable: true, - display_messages: false, + display_progress_messages: false, + display_messages: true, auto_signature_help: true, display_signature_help_docs: true, display_inlay_hints: false, @@ -1272,6 +1275,13 @@ impl Editor { } #[inline] + pub fn set_warning<T: Into<Cow<'static, str>>>(&mut self, warning: T) { + let warning = warning.into(); + log::warn!("editor warning: {}", warning); + self.status_msg = Some((warning, Severity::Warning)); + } + + #[inline] pub fn get_status(&self) -> Option<(&Cow<'static, str>, &Severity)> { self.status_msg.as_ref().map(|(status, sev)| (status, sev)) } |