mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/vim-autosource: init
This commit is contained in:
parent
9248da3c3b
commit
4df5746694
3 changed files with 48 additions and 0 deletions
|
@ -153,6 +153,7 @@
|
|||
./utils/auto-save.nix
|
||||
./utils/auto-session.nix
|
||||
./utils/autoclose.nix
|
||||
./utils/autosource.nix
|
||||
./utils/bacon.nix
|
||||
./utils/baleia.nix
|
||||
./utils/better-escape.nix
|
||||
|
|
31
plugins/utils/autosource.nix
Normal file
31
plugins/utils/autosource.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.nixvim) defaultNullOpts;
|
||||
mkBoolInt = defaultNullOpts.mkEnum [
|
||||
0
|
||||
1
|
||||
];
|
||||
in
|
||||
lib.nixvim.vim-plugin.mkVimPlugin {
|
||||
name = "autosource";
|
||||
originalName = "vim-autosource";
|
||||
package = "vim-autosource";
|
||||
globalPrefix = "autosource_";
|
||||
|
||||
maintainers = [ lib.nixvim.maintainers.refaelsh ];
|
||||
|
||||
settingsOptions = {
|
||||
prompt_for_new_file = mkBoolInt 1 ''
|
||||
The primary use-case of this option is to support automated testing.
|
||||
When set to false AutoSource will not prompt you when it detects a new file. The file will *NOT* be sourced.
|
||||
'';
|
||||
|
||||
prompt_for_changed_file = mkBoolInt 1 ''
|
||||
The primary use-case of this option is to support automated testing.
|
||||
When set to false AutoSource will not prompt you when it detects when a file is changed. The file will NOT be sourced.
|
||||
'';
|
||||
};
|
||||
}
|
16
tests/test-sources/plugins/utils/autosource.nix
Normal file
16
tests/test-sources/plugins/utils/autosource.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.autosource.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.autosource = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
prompt_for_new_file = 1;
|
||||
prompt_for_changed_file = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue