feat: [editor.vcs] -> [editor.version-control]

This commit is contained in:
Nik Revenco 2025-03-19 12:51:13 +00:00
parent fc19b756ee
commit 2e756a9348
4 changed files with 6 additions and 9 deletions

View file

@ -4,7 +4,7 @@
- [`[editor.clipboard-provider]` Section](#editorclipboard-provider-section) - [`[editor.clipboard-provider]` Section](#editorclipboard-provider-section)
- [`[editor.statusline]` Section](#editorstatusline-section) - [`[editor.statusline]` Section](#editorstatusline-section)
- [`[editor.lsp]` Section](#editorlsp-section) - [`[editor.lsp]` Section](#editorlsp-section)
- [`[editor.vcs]` Section](#editorvcs-section) - [`[editor.version-control]` Section](#editorversioncontrol-section)
- [`[editor.cursor-shape]` Section](#editorcursor-shape-section) - [`[editor.cursor-shape]` Section](#editorcursor-shape-section)
- [`[editor.file-picker]` Section](#editorfile-picker-section) - [`[editor.file-picker]` Section](#editorfile-picker-section)
- [`[editor.auto-pairs]` Section](#editorauto-pairs-section) - [`[editor.auto-pairs]` Section](#editorauto-pairs-section)
@ -160,9 +160,7 @@ The following statusline elements can be configured:
[^2]: You may also have to activate them in the language server config for them to appear, not just in Helix. Inlay hints in Helix are still being improved on and may be a little bit laggy/janky under some circumstances. Please report any bugs you see so we can fix them! [^2]: You may also have to activate them in the language server config for them to appear, not just in Helix. Inlay hints in Helix are still being improved on and may be a little bit laggy/janky under some circumstances. Please report any bugs you see so we can fix them!
### `[editor.vcs]` Section ### `[editor.version-control]` Section
Version control config.
| Key | Description | Default | | Key | Description | Default |
| ------- | ------------------------------------------ | ------- | | ------- | ------------------------------------------ | ------- |

View file

@ -64,7 +64,7 @@ impl helix_event::AsyncHook for BlameHandler {
pub(super) fn register_hooks(handlers: &Handlers) { pub(super) fn register_hooks(handlers: &Handlers) {
let tx = handlers.blame.clone(); let tx = handlers.blame.clone();
register_hook!(move |event: &mut PostCommand<'_, '_>| { register_hook!(move |event: &mut PostCommand<'_, '_>| {
if !event.cx.editor.config().vcs.blame { if !event.cx.editor.config().version_control.blame {
return Ok(()); return Ok(());
} }

View file

@ -201,7 +201,7 @@ impl EditorView {
inline_diagnostic_config, inline_diagnostic_config,
config.end_of_line_diagnostics, config.end_of_line_diagnostics,
)); ));
if config.vcs.blame { if config.version_control.blame {
if let Some(blame) = &doc.blame { if let Some(blame) = &doc.blame {
decorations.add_decoration(text_decorations::blame::EolBlame::new( decorations.add_decoration(text_decorations::blame::EolBlame::new(
doc, doc,

View file

@ -373,8 +373,7 @@ pub struct Config {
pub end_of_line_diagnostics: DiagnosticFilter, pub end_of_line_diagnostics: DiagnosticFilter,
// Set to override the default clipboard provider // Set to override the default clipboard provider
pub clipboard_provider: ClipboardProvider, pub clipboard_provider: ClipboardProvider,
/// Version control pub version_control: VersionControlConfig,
pub vcs: VersionControlConfig,
} }
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)] #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, Eq, PartialOrd, Ord)]
@ -1018,7 +1017,7 @@ impl Default for Config {
inline_diagnostics: InlineDiagnosticsConfig::default(), inline_diagnostics: InlineDiagnosticsConfig::default(),
end_of_line_diagnostics: DiagnosticFilter::Disable, end_of_line_diagnostics: DiagnosticFilter::Disable,
clipboard_provider: ClipboardProvider::default(), clipboard_provider: ClipboardProvider::default(),
vcs: VersionControlConfig::default(), version_control: VersionControlConfig::default(),
} }
} }
} }