File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
tests/test-sources/modules Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
lib ,
3
3
config ,
4
- helpers ,
5
4
...
6
5
} :
7
6
let
8
7
cfg = config . luaLoader ;
8
+ inherit ( lib . nixvim ) mkNullOrOption mkIfNonNull' toLuaObject ;
9
9
in
10
10
{
11
- options . luaLoader . enable = helpers . mkNullOrOption lib . types . bool ''
11
+ options . luaLoader . enable = mkNullOrOption lib . types . bool ''
12
12
Whether to enable/disable the experimental lua loader:
13
13
14
14
If `true`: Enables the experimental Lua module loader:
24
24
If `null`: Nothing is configured.
25
25
'' ;
26
26
27
- config = helpers . mkIfNonNull' cfg . enable {
28
- extraConfigLuaPre = if cfg . enable then "vim.loader.enable()" else "vim.loader.disable( )";
27
+ config = mkIfNonNull' cfg . enable {
28
+ extraConfigLuaPre = "vim.loader.enable(${ toLuaObject cfg . enable } )" ;
29
29
} ;
30
30
}
Original file line number Diff line number Diff line change 27
27
28
28
assertions = [
29
29
{
30
- assertion = lib . hasInfix "vim.loader.enable()" config . content ;
30
+ assertion = lib . hasInfix "vim.loader.enable(true )" config . content ;
31
31
message = "luaLoader is expected to be explicitly enabled." ;
32
32
}
33
33
{
47
47
48
48
assertions = [
49
49
{
50
- assertion = lib . hasInfix "vim.loader.disable( )" config . content ;
50
+ assertion = lib . hasInfix "vim.loader.enable(false )" config . content ;
51
51
message = "luaLoader is expected to be explicitly disabled." ;
52
52
}
53
53
{
You can’t perform that action at this time.
0 commit comments