mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-16 09:01:03 +00:00
cmp: install sourcess via cmp.sourcePlugins
This commit is contained in:
parent
0397d0722f
commit
eff15d27b4
7 changed files with 68 additions and 84 deletions
|
|
@ -4,7 +4,6 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
|
||||
cfg = config.vim.snippets.luasnip;
|
||||
in {
|
||||
|
|
@ -16,20 +15,12 @@ in {
|
|||
lazy = true;
|
||||
after = cfg.loaders;
|
||||
};
|
||||
cmp-luasnip = mkIf config.vim.autocomplete.nvim-cmp.enable {
|
||||
package = "cmp-luasnip";
|
||||
lazy = true;
|
||||
after = ''
|
||||
local path = vim.fn.globpath(vim.o.packpath, 'pack/*/opt/cmp-luasnip')
|
||||
require("rtp_nvim").source_after_plugin_dir(path)
|
||||
'';
|
||||
};
|
||||
nvim-cmp.after = optionalString config.vim.lazy.enable ''
|
||||
require("lz.n").trigger_load("cmp-luasnip")
|
||||
'';
|
||||
};
|
||||
startPlugins = cfg.providers;
|
||||
autocomplete.nvim-cmp.sources = {luasnip = "[LuaSnip]";};
|
||||
autocomplete.nvim-cmp = {
|
||||
sources = {luasnip = "[LuaSnip]";};
|
||||
sourcePlugins = ["cmp-luasnip"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue