mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
plugins/direnv: init (#1153)
This commit is contained in:
parent
8b013707cc
commit
38a2018904
3 changed files with 49 additions and 0 deletions
|
@ -120,6 +120,7 @@
|
||||||
./utils/coverage.nix
|
./utils/coverage.nix
|
||||||
./utils/cursorline.nix
|
./utils/cursorline.nix
|
||||||
./utils/dashboard.nix
|
./utils/dashboard.nix
|
||||||
|
./utils/direnv.nix
|
||||||
./utils/easyescape.nix
|
./utils/easyescape.nix
|
||||||
./utils/emmet.nix
|
./utils/emmet.nix
|
||||||
./utils/endwise.nix
|
./utils/endwise.nix
|
||||||
|
|
33
plugins/utils/direnv.nix
Normal file
33
plugins/utils/direnv.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
helpers,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
helpers.vim-plugin.mkVimPlugin config {
|
||||||
|
name = "direnv";
|
||||||
|
originalName = "direnv.vim";
|
||||||
|
defaultPackage = pkgs.vimPlugins.direnv-vim;
|
||||||
|
globalPrefix = "direnv_";
|
||||||
|
extraPackages = [pkgs.direnv];
|
||||||
|
|
||||||
|
maintainers = [helpers.maintainers.alisonjenkins];
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
direnv_auto = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
It will not execute :DirenvExport automatically if the value is false. Default: true.
|
||||||
|
'';
|
||||||
|
|
||||||
|
direnv_edit_mode =
|
||||||
|
helpers.defaultNullOpts.mkEnum ["edit" "split" "tabedit" "vsplit"]
|
||||||
|
"edit" ''
|
||||||
|
Select the command to open buffers to edit. Default: 'edit'.
|
||||||
|
'';
|
||||||
|
|
||||||
|
direnv_silent_load = helpers.defaultNullOpts.mkBool true ''
|
||||||
|
Stop echoing output from Direnv command. Default: true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
15
tests/test-sources/plugins/utils/direnv.nix
Normal file
15
tests/test-sources/plugins/utils/direnv.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
empty = {plugins.direnv.enable = true;};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.direnv = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
direnv_auto = false;
|
||||||
|
direnv_edit_mode = "vsplit";
|
||||||
|
direnv_silent_load = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue