fix: bug cmp and lsp with lazy enabled for rg

This commit is contained in:
Adrien Waksberg 2024-10-30 10:49:19 +01:00
parent 04c29f5f0f
commit c0062610a4
2 changed files with 6 additions and 13 deletions

View file

@ -13,21 +13,12 @@ for _, lsp in ipairs(servers) do
lspconfig[lsp].setup { lspconfig[lsp].setup {
on_attach = on_attach, on_attach = on_attach,
on_init = on_init, on_init = on_init,
capabilities = { capabilities = capabilities,
textDocument = {
completion = {
completionItem = {
snippetSupport = false,
},
},
},
},
} }
end end
require("cmp").setup { require("cmp").setup {
sources = { sources = {
{ name = "buffer" },
{ name = "path" }, { name = "path" },
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "rg", keyword_length = 4 }, { name = "rg", keyword_length = 4 },

View file

@ -1,11 +1,13 @@
return { return {
{ {
"mfussenegger/nvim-ansible", "mfussenegger/nvim-ansible",
lazy = false,
}, },
{ {
"lukas-reineke/cmp-rg", "hrsh7th/nvim-cmp",
lazy = false, event = "InsertEnter",
dependencies = {
"lukas-reineke/cmp-rg",
},
}, },
{ {
"sindrets/diffview.nvim", "sindrets/diffview.nvim",