mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
helix: add ignores option
This commit is contained in:
parent
8ff7bb3f4d
commit
b5b2b1ac63
3 changed files with 20 additions and 0 deletions
|
@ -96,6 +96,16 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
ignores = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ ".build/" "!.gitignore" ];
|
||||
description = ''
|
||||
List of paths that should be globally ignored for file picker.
|
||||
Supports the usual ignore and negative ignore (unignore) rules used in `.gitignore` files.
|
||||
'';
|
||||
};
|
||||
|
||||
themes = mkOption {
|
||||
type = types.attrsOf tomlFormat.type;
|
||||
default = { };
|
||||
|
@ -195,6 +205,9 @@ in {
|
|||
"helix/languages.toml" = mkIf (cfg.languages != { }) {
|
||||
source = tomlFormat.generate "helix-languages-config" cfg.languages;
|
||||
};
|
||||
"helix/ignore" = mkIf (cfg.ignores != [ ]) {
|
||||
text = concatStringsSep "\n" cfg.ignores + "\n";
|
||||
};
|
||||
};
|
||||
|
||||
themes = (mapAttrs' (n: v:
|
||||
|
|
|
@ -43,6 +43,8 @@ with lib;
|
|||
}];
|
||||
};
|
||||
|
||||
ignores = [ ".build/" "!.gitignore" ];
|
||||
|
||||
themes = {
|
||||
base16 = let
|
||||
transparent = "none";
|
||||
|
@ -131,6 +133,9 @@ with lib;
|
|||
assertFileContent \
|
||||
home-files/.config/helix/languages.toml \
|
||||
${./languages-expected.toml}
|
||||
assertFileContent \
|
||||
home-files/.config/helix/ignore \
|
||||
${./ignore-expected}
|
||||
assertFileContent \
|
||||
home-files/.config/helix/themes/base16.toml \
|
||||
${./theme-base16-expected.toml}
|
||||
|
|
2
tests/modules/programs/helix/ignore-expected
Normal file
2
tests/modules/programs/helix/ignore-expected
Normal file
|
@ -0,0 +1,2 @@
|
|||
.build/
|
||||
!.gitignore
|
Loading…
Reference in a new issue