diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 2cd461a..1fffffd 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -64,12 +64,19 @@ require('mason-lspconfig').setup({ local cmp = require('cmp') local cmp_select = {behavior = cmp.SelectBehavior.Select} +local luasnip= require('luasnip') cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end + }, sources = { {name = 'path'}, {name = 'nvim_lsp'}, {name = 'nvim_lua'}, + {name = 'luasnip'}, }, mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.select_prev_item(cmp_select),