File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
plugins/by-name/lzn-auto-require
tests/test-sources/plugins/by-name/lzn-auto-require Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ { lib , ... } :
2
+ lib . nixvim . plugins . mkNeovimPlugin {
3
+ name = "lzn-auto-require" ;
4
+ description = ''
5
+ Auto load optional plugins via lua modules with `lz.n`.
6
+
7
+ This plugin overrides the `require` function to also search for plugins in
8
+ `{packpath}/*/opt` and load them using `lz.n`.
9
+ '' ;
10
+
11
+ hasSettings = false ;
12
+ setup = ".enable" ;
13
+ configLocation = lib . mkOrder 5000 "extraConfigLuaPost" ; # Register after everything to catch mistates
14
+
15
+ maintainers = [ lib . maintainers . axka ] ;
16
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ e2e =
3
+ { lib , ... } :
4
+ {
5
+ plugins . lz-n . enable = true ;
6
+ plugins . lzn-auto-require . enable = true ;
7
+
8
+ plugins . smart-splits = {
9
+ enable = true ;
10
+ lazyLoad . settings . lazy = true ; # manual lazy-loading
11
+ } ;
12
+
13
+ extraConfigLuaPost = lib . mkMerge [
14
+ ( lib . mkOrder 4999 ''
15
+ local success, _ = pcall(require, 'smart-splits')
16
+ if success then
17
+ print("require should not succeed")
18
+ end
19
+ '' )
20
+ ( lib . mkOrder 5001 ''
21
+ local success, _ = pcall(require, 'smart-splits')
22
+ if not success then
23
+ print("require should succeed")
24
+ end
25
+ '' )
26
+ ] ;
27
+ } ;
28
+ }
You can’t perform that action at this time.
0 commit comments