From 514c0a71f47cb80282742d7e4b6913c2c0582c2d Mon Sep 17 00:00:00 2001 From: Matthias Jonen <53423348+MatthiasJonen@users.noreply.github.com> Date: Thu, 4 May 2023 00:42:04 +0200 Subject: [PATCH] helix: provide more detailed settings description (#3932) Helix changed the definition of options. E.g. editor specific options need to be prefixed with editor. --- modules/programs/helix.nix | 6 +++++- tests/modules/programs/helix/example-settings.nix | 6 +++++- tests/modules/programs/helix/settings-expected.toml | 12 +++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix index 9d06b65c..bec6428c 100644 --- a/modules/programs/helix.nix +++ b/modules/programs/helix.nix @@ -24,11 +24,15 @@ in { example = literalExpression '' { theme = "base16"; - lsp.display-messages = true; + editor = { + line-number = "relative"; + lsp.display-messages = true; + }; keys.normal = { space.space = "file_picker"; space.w = ":w"; space.q = ":q"; + esc = [ "collapse_selection" "keep_primary_selection" ]; }; } ''; diff --git a/tests/modules/programs/helix/example-settings.nix b/tests/modules/programs/helix/example-settings.nix index ed0b4713..6a26c75e 100644 --- a/tests/modules/programs/helix/example-settings.nix +++ b/tests/modules/programs/helix/example-settings.nix @@ -9,11 +9,15 @@ with lib; settings = { theme = "base16"; - lsp.display-messages = true; + editor = { + line-number = "relative"; + lsp.display-messages = true; + }; keys.normal = { space.space = "file_picker"; space.w = ":w"; space.q = ":q"; + esc = [ "collapse_selection" "keep_primary_selection" ]; }; }; diff --git a/tests/modules/programs/helix/settings-expected.toml b/tests/modules/programs/helix/settings-expected.toml index 772bcf52..a18ec347 100644 --- a/tests/modules/programs/helix/settings-expected.toml +++ b/tests/modules/programs/helix/settings-expected.toml @@ -1,9 +1,15 @@ theme = "base16" +[editor] +line-number = "relative" + +[editor.lsp] +display-messages = true + +[keys.normal] +esc = ["collapse_selection", "keep_primary_selection"] + [keys.normal.space] q = ":q" space = "file_picker" w = ":w" - -[lsp] -display-messages = true