nvim: cmp: add nvim completion for lua files
This commit is contained in:
parent
59b75ab95a
commit
082f7d7be6
|
@ -14,6 +14,7 @@ packer.use {
|
|||
'https://github.com/saadparwaiz1/cmp_luasnip',
|
||||
requires = 'https://github.com/L3MON4D3/LuaSnip'
|
||||
},
|
||||
'https://github.com/hrsh7th/cmp-nvim-lua',
|
||||
},
|
||||
config = function()
|
||||
local cmp = require'cmp'
|
||||
|
@ -68,13 +69,15 @@ packer.use {
|
|||
})
|
||||
|
||||
-- -- Set configuration for specific filetype.
|
||||
-- cmp.setup.filetype('gitcommit', {
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = 'cmp_git' },
|
||||
-- }, {
|
||||
-- { name = 'buffer' },
|
||||
-- })
|
||||
-- })
|
||||
cmp.setup.filetype('lua', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lua' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/`
|
||||
cmp.setup.cmdline('/', {
|
||||
|
|
Loading…
Reference in New Issue
Block a user