mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
feat(options): add defaultEditor
option (#589)
This commit is contained in:
parent
358f5732f2
commit
bfd1c5bace
3 changed files with 12 additions and 6 deletions
|
@ -18,7 +18,10 @@ in {
|
||||||
default = {};
|
default = {};
|
||||||
type = types.submodule ([
|
type = types.submodule ([
|
||||||
{
|
{
|
||||||
options.enable = mkEnableOption "nixvim";
|
options = {
|
||||||
|
enable = mkEnableOption "nixvim";
|
||||||
|
defaultEditor = mkEnableOption "Set nixvim as the default editor";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ shared.topLevelModules);
|
++ shared.topLevelModules);
|
||||||
|
@ -34,7 +37,7 @@ in {
|
||||||
xdg.configFile = files;
|
xdg.configFile = files;
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
inherit (cfg) warnings assertions;
|
inherit (cfg) warnings assertions defaultEditor;
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Symlink <command>vi</command> to <command>nvim</command> binary.
|
Symlink `vi` to `nvim` binary.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Symlink <command>vim</command> to <command>nvim</command> binary.
|
Symlink `vim` to `nvim` binary.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,10 @@ in {
|
||||||
default = {};
|
default = {};
|
||||||
type = types.submodule ([
|
type = types.submodule ([
|
||||||
{
|
{
|
||||||
options.enable = mkEnableOption "nixvim";
|
options = {
|
||||||
|
enable = mkEnableOption "nixvim";
|
||||||
|
defaultEditor = mkEnableOption "Set nixvim as the default editor";
|
||||||
|
};
|
||||||
config.wrapRc = mkForce true;
|
config.wrapRc = mkForce true;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -36,7 +39,7 @@ in {
|
||||||
environment.variables."VIM" = "/etc/nvim";
|
environment.variables."VIM" = "/etc/nvim";
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
inherit (cfg) warnings assertions;
|
inherit (cfg) warnings assertions defaultEditor;
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue