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',
|
'https://github.com/saadparwaiz1/cmp_luasnip',
|
||||||
requires = 'https://github.com/L3MON4D3/LuaSnip'
|
requires = 'https://github.com/L3MON4D3/LuaSnip'
|
||||||
},
|
},
|
||||||
|
'https://github.com/hrsh7th/cmp-nvim-lua',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require'cmp'
|
local cmp = require'cmp'
|
||||||
|
@ -68,13 +69,15 @@ packer.use {
|
||||||
})
|
})
|
||||||
|
|
||||||
-- -- Set configuration for specific filetype.
|
-- -- Set configuration for specific filetype.
|
||||||
-- cmp.setup.filetype('gitcommit', {
|
cmp.setup.filetype('lua', {
|
||||||
-- sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
-- { name = 'cmp_git' },
|
{ name = 'nvim_lsp' },
|
||||||
-- }, {
|
{ name = 'luasnip' },
|
||||||
-- { name = 'buffer' },
|
{ name = 'nvim_lua' },
|
||||||
-- })
|
}, {
|
||||||
-- })
|
{ name = 'buffer' },
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
-- Use buffer source for `/`
|
||||||
cmp.setup.cmdline('/', {
|
cmp.setup.cmdline('/', {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user