mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-20 02:18:06 +00:00
cmp-nvim-lsp: lazy load
This commit is contained in:
parent
6664304f7e
commit
70e988bb33
1 changed files with 11 additions and 1 deletions
|
@ -23,7 +23,17 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = optional usingNvimCmp "cmp-nvim-lsp";
|
||||
lazy.plugins = {
|
||||
cmp-nvim-lsp = {
|
||||
package = "cmp-nvim-lsp";
|
||||
lazy = true;
|
||||
after = ''
|
||||
local path = vim.fn.globpath(vim.o.packpath, 'pack/*/opt/cmp-treesitter')
|
||||
require("rtp_nvim").source_after_plugin_dir(path)
|
||||
'';
|
||||
};
|
||||
nvim-cmp.after = mkIf usingNvimCmp "require('lz.n').trigger_load('cmp-nvim-lsp')";
|
||||
};
|
||||
|
||||
autocomplete.nvim-cmp.sources = {nvim_lsp = "[LSP]";};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue