mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
This commit adds a `plugins.<name>.luaConfig` section controlling the plugin specific configuration. The section contains the internal `init` option, containing the plugin's initialization code. It also contains the public `pre` and `post` options, that allow to add code before & after the `init` section Finally, it contains the `final` option, being the concatenation of the three previous options.
26 lines
535 B
Nix
26 lines
535 B
Nix
{
|
|
lua-config-pre-post = {
|
|
extraConfigLuaPre = ''
|
|
list = {}
|
|
'';
|
|
plugins.cmp = {
|
|
enable = true;
|
|
luaConfig = {
|
|
pre = ''
|
|
table.insert(list, "pre")
|
|
'';
|
|
content = ''
|
|
table.insert(list, "init")
|
|
'';
|
|
post = ''
|
|
table.insert(list, "post")
|
|
'';
|
|
};
|
|
};
|
|
extraConfigLuaPost = ''
|
|
if not vim.deep_equal(list, {"pre", "init", "post"}) then
|
|
vim.print("Unexpected list: " .. vim.inspect(list))
|
|
end
|
|
'';
|
|
};
|
|
}
|