mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
telescope: wrap setup code in do...end
This commit is contained in:
parent
4ff6dcb863
commit
3bb3b7efb5
2 changed files with 12 additions and 9 deletions
1
TODO.md
Normal file
1
TODO.md
Normal file
|
@ -0,0 +1 @@
|
|||
- Test if the config is actually being evaluated - this is easy to check by purposefully causing an error
|
|
@ -25,13 +25,13 @@ in
|
|||
enabledExtensions = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "A list of enabled extensions. Don't use this directly";
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
extensionConfig = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
description = "Configuration for the extensions. Don't use this directly";
|
||||
default = {};
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -50,16 +50,18 @@ in
|
|||
'';
|
||||
|
||||
extraConfigLua = ''
|
||||
local __telescopeExtensions = ${helpers.toLuaObject cfg.enabledExtensions}
|
||||
do
|
||||
local __telescopeExtensions = ${helpers.toLuaObject cfg.enabledExtensions}
|
||||
|
||||
require('telescope').setup{
|
||||
extensions = ${helpers.toLuaObject cfg.extensionConfig}
|
||||
}
|
||||
require('telescope').setup{
|
||||
extensions = ${helpers.toLuaObject cfg.extensionConfig}
|
||||
}
|
||||
|
||||
for i, extension in ipairs(__telescopeExtensions) do
|
||||
require('telescope').load_extension(extension)
|
||||
for i, extension in ipairs(__telescopeExtensions) do
|
||||
require('telescope').load_extension(extension)
|
||||
end
|
||||
end
|
||||
'' ;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue