Closed ryannewcomer closed 6 months ago
Your config uses vim-plug
. But the description is for lazy plugin manager.
It seems confusing.
Because the minimum configure has to be vim
-- setup lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
require("lazy").setup({
{
"hrsh7th/nvim-cmp",
-- load cmp on InsertEnter
event = "InsertEnter",
-- these dependencies will only be loaded when cmp loads
-- dependencies are always lazy-loaded unless specified otherwise
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
},
config = function()
local cmp = require "cmp"
cmp.setup {
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
['<CR>'] = cmp.mapping.confirm({ select = true })
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "buffer" },
}),
}
local capabilities = require('cmp_nvim_lsp').default_capabilities()
require'lspconfig'.cssls.setup {
capabilities = capabilities,
}
end,
},
})
the above setup work when i use nvim -u cmp-min-config.lua
It is not nvim-cmp issue. It should be asked for lazy.nvim.
Thanks
FAQ
Announcement
Minimal reproducible full config
Description
i have used the default config showed in readme, then remove the mapping and paste the super tab from wiki, then i config nvim-lspconfig and insert the server. then i restart neovim. but still the plugin is not loaded
Steps to reproduce
Expected behavior
the plugin is not loaded in lazy:
Actual behavior
nothing happen when i type on a lua or html file
Additional context
my cmp config: