Add buffer as a source for completion

This commit is contained in:
Sheldon Lee 2023-04-10 00:55:36 +01:00
parent 2c9853a3dd
commit 1aead50db3
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,8 @@
local lsp = require('lsp-zero').preset({}) local lsp = require('lsp-zero').preset({
manage_nvim_cmp = {
set_sources = 'recommended',
}
})
local cmp = require('cmp'); local cmp = require('cmp');
-- Set the lsp autocomplete to put text from selection into the buffer. -- Set the lsp autocomplete to put text from selection into the buffer.

View File

@ -39,6 +39,7 @@ return require('packer').startup(function(use)
-- Autocompletion -- Autocompletion
{'hrsh7th/nvim-cmp'}, -- Required {'hrsh7th/nvim-cmp'}, -- Required
{'hrsh7th/cmp-nvim-lsp'}, -- Required {'hrsh7th/cmp-nvim-lsp'}, -- Required
{'hrsh7th/cmp-buffer'},
{'L3MON4D3/LuaSnip'}, -- Required {'L3MON4D3/LuaSnip'}, -- Required
} }
} }