File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed
tests/test-sources/plugins/utils Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 153153 ./utils/auto-save.nix
154154 ./utils/auto-session.nix
155155 ./utils/autoclose.nix
156+ ./utils/autosource.nix
156157 ./utils/bacon.nix
157158 ./utils/baleia.nix
158159 ./utils/better-escape.nix
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ ...
4+ } :
5+ let
6+ inherit ( lib . nixvim ) defaultNullOpts ;
7+ mkBoolInt = defaultNullOpts . mkEnum [
8+ 0
9+ 1
10+ ] ;
11+ in
12+ lib . nixvim . vim-plugin . mkVimPlugin {
13+ name = "autosource" ;
14+ originalName = "vim-autosource" ;
15+ package = "vim-autosource" ;
16+ globalPrefix = "autosource_" ;
17+
18+ maintainers = [ lib . nixvim . maintainers . refaelsh ] ;
19+
20+ settingsOptions = {
21+ prompt_for_new_file = mkBoolInt 1 ''
22+ The primary use-case of this option is to support automated testing.
23+ When set to false AutoSource will not prompt you when it detects a new file. The file will *NOT* be sourced.
24+ '' ;
25+
26+ prompt_for_changed_file = mkBoolInt 1 ''
27+ The primary use-case of this option is to support automated testing.
28+ When set to false AutoSource will not prompt you when it detects when a file is changed. The file will NOT be sourced.
29+ '' ;
30+ } ;
31+ }
Original file line number Diff line number Diff line change 1+ {
2+ empty = {
3+ plugins . autosource . enable = true ;
4+ } ;
5+
6+ defaults = {
7+ plugins . autosource = {
8+ enable = true ;
9+
10+ settings = {
11+ prompt_for_new_file = 1 ;
12+ prompt_for_changed_file = 1 ;
13+ } ;
14+ } ;
15+ } ;
16+ }
You can’t perform that action at this time.
0 commit comments