mirror of https://github.com/helix-editor/helix
Compare commits
2 Commits
601fcb1aea
...
3d4125bd3f
Author | SHA1 | Date |
---|---|---|
|
3d4125bd3f | |
|
a9d3c65d61 |
|
@ -104,6 +104,8 @@ separator = "│"
|
||||||
mode.normal = "NORMAL"
|
mode.normal = "NORMAL"
|
||||||
mode.insert = "INSERT"
|
mode.insert = "INSERT"
|
||||||
mode.select = "SELECT"
|
mode.select = "SELECT"
|
||||||
|
diagnostics = ["warning", "error"]
|
||||||
|
workspace-diagnostics = ["warning", "error"]
|
||||||
```
|
```
|
||||||
The `[editor.statusline]` key takes the following sub-keys:
|
The `[editor.statusline]` key takes the following sub-keys:
|
||||||
|
|
||||||
|
@ -116,6 +118,8 @@ The `[editor.statusline]` key takes the following sub-keys:
|
||||||
| `mode.normal` | The text shown in the `mode` element for normal mode | `"NOR"` |
|
| `mode.normal` | The text shown in the `mode` element for normal mode | `"NOR"` |
|
||||||
| `mode.insert` | The text shown in the `mode` element for insert mode | `"INS"` |
|
| `mode.insert` | The text shown in the `mode` element for insert mode | `"INS"` |
|
||||||
| `mode.select` | The text shown in the `mode` element for select mode | `"SEL"` |
|
| `mode.select` | The text shown in the `mode` element for select mode | `"SEL"` |
|
||||||
|
| `diagnostics` | A list of severities which are displayed for the current buffer | `["warning", "error"]` |
|
||||||
|
| `workspace-diagnostics` | A list of severities which are displayed for the workspace | `["warning", "error"]` |
|
||||||
|
|
||||||
The following statusline elements can be configured:
|
The following statusline elements can be configured:
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ where
|
||||||
write(context, " W ".into(), None);
|
write(context, " W ".into(), None);
|
||||||
}
|
}
|
||||||
|
|
||||||
for sev in &context.editor.config().statusline.w_diagnostics {
|
for sev in &context.editor.config().statusline.workspace_diagnostics {
|
||||||
match sev {
|
match sev {
|
||||||
Severity::Hint if hints > 0 => {
|
Severity::Hint if hints > 0 => {
|
||||||
write(
|
write(
|
||||||
|
|
|
@ -498,7 +498,7 @@ pub struct StatusLineConfig {
|
||||||
pub separator: String,
|
pub separator: String,
|
||||||
pub mode: ModeConfig,
|
pub mode: ModeConfig,
|
||||||
pub diagnostics: Vec<Severity>,
|
pub diagnostics: Vec<Severity>,
|
||||||
pub w_diagnostics: Vec<Severity>,
|
pub workspace_diagnostics: Vec<Severity>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for StatusLineConfig {
|
impl Default for StatusLineConfig {
|
||||||
|
@ -524,7 +524,7 @@ impl Default for StatusLineConfig {
|
||||||
separator: String::from("│"),
|
separator: String::from("│"),
|
||||||
mode: ModeConfig::default(),
|
mode: ModeConfig::default(),
|
||||||
diagnostics: vec![Severity::Warning, Severity::Error],
|
diagnostics: vec![Severity::Warning, Severity::Error],
|
||||||
w_diagnostics: vec![Severity::Warning, Severity::Error],
|
workspace_diagnostics: vec![Severity::Warning, Severity::Error],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue