mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-16 17:11:02 +00:00
cmp: actually lazy load source
This commit is contained in:
parent
f107cc45eb
commit
4b703964e1
4 changed files with 43 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
|
||||
cfg = config.vim.snippets.luasnip;
|
||||
in {
|
||||
|
|
@ -18,7 +19,14 @@ in {
|
|||
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]";};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue