added friendly snippets
This commit is contained in:
parent
657913ee29
commit
08e050ed04
|
@ -1,6 +1,5 @@
|
||||||
--configure nvim-cmp for use with lsp and luasnip.
|
--configure nvim-cmp for use with lsp and luasnip.
|
||||||
|
|
||||||
|
|
||||||
-- Add additional capabilities supported by nvim-cmp
|
-- Add additional capabilities supported by nvim-cmp
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||||
|
@ -40,6 +39,7 @@ cmp.setup {
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
['<Tab>'] = function(fallback)
|
['<Tab>'] = function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
|
@ -58,7 +58,6 @@ cmp.setup {
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
|
|
|
@ -34,6 +34,18 @@ return require('packer').startup(function(use)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- 'honza/vim-snippets',
|
||||||
|
use {'L3MON4D3/LuaSnip',
|
||||||
|
requires={
|
||||||
|
'rafamadriz/friendly-snippets'
|
||||||
|
},
|
||||||
|
config=function()
|
||||||
|
require("luasnip.loaders.from_snipmate").load()
|
||||||
|
require("luasnip.loaders.from_vscode").load()
|
||||||
|
end
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
use {'nvim-telescope/telescope.nvim',
|
use {'nvim-telescope/telescope.nvim',
|
||||||
requires = {
|
requires = {
|
||||||
{'nvim-lua/plenary.nvim'},
|
{'nvim-lua/plenary.nvim'},
|
||||||
|
|
Loading…
Reference in a new issue