Skip to content

Commit

Permalink
Add setting for window/showMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoub-benali committed Jan 22, 2023
1 parent 663a2e5 commit 2d8f044
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion book/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ The following statusline elements can be configured:

| Key | Description | Default |
| --- | ----------- | ------- |
| `display-messages` | Display LSP progress messages below statusline[^1] | `false` |
| `display-messages` | Display LSP window/showMessage messages below statusline | `false` |
| `display-progress-messages` | Display LSP progress messages below statusline[^1] | `false` |
| `auto-signature-help` | Enable automatic popup of signature help (parameter hints) | `true` |
| `display-signature-help-docs` | Display docs under signature help popup | `true` |

Expand Down
2 changes: 1 addition & 1 deletion helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ impl Application {
self.lsp_progress.update(server_id, token, work);
}

if self.config.load().editor.lsp.display_messages {
if self.config.load().editor.lsp.display_progress_messages {
self.editor.set_status(status);
}
}
Expand Down
5 changes: 4 additions & 1 deletion helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ pub fn get_terminal_provider() -> Option<TerminalConfig> {
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default, rename_all = "kebab-case", deny_unknown_fields)]
pub struct LspConfig {
/// 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,
Expand All @@ -337,6 +339,7 @@ pub struct LspConfig {
impl Default for LspConfig {
fn default() -> Self {
Self {
display_progress_messages: false,
display_messages: false,
auto_signature_help: true,
display_signature_help_docs: true,
Expand Down

0 comments on commit 2d8f044

Please sign in to comment.