diff --git a/lua/debug.lua b/lua/debug.lua index 5b5b393..e40b4af 100644 --- a/lua/debug.lua +++ b/lua/debug.lua @@ -4,14 +4,8 @@ local cmp = require'cmp' cmp.setup({ snippet = { expand = function(args) - -- For `vsnip` user. - vim.fn["vsnip#anonymous"](args.body) - - -- For `luasnip` user. - -- require('luasnip').lsp_expand(args.body) - - -- For `ultisnips` user. - -- vim.fn["UltiSnips#Anon"](args.body) + --vim.fn["vsnip#anonymous"](args.body) + require('luasnip').lsp_expand(args.body) end, }, mapping = { diff --git a/lua/my-lsp.lua b/lua/my-lsp.lua index f3f4b61..e3b58cf 100644 --- a/lua/my-lsp.lua +++ b/lua/my-lsp.lua @@ -45,7 +45,6 @@ local on_attach = function(client, bufnr) map("n", "aw", function() vim.diagnostic.setqflist({ severity = "W" }) end, opts) map("n", "ae", function() vim.diagnostic.setqflist({ severity = "E" }) end, opts) - vim.cmd [[autocmd BufEnter,BufWrite lua vim.lsp.codelens.refresh()]] vim.cmd [[autocmd CursorHoldI * silent! lua vim.lsp.buf.signature_help()]] vim.cmd [[autocmd CursorHold * lua vim.diagnostic.open_float({max_width = 100, focusable = false})]] end diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 109a19c..4fe090c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -11,9 +11,11 @@ return { 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-cmdline', - 'hrsh7th/cmp-vsnip', - 'hrsh7th/vim-vsnip', - 'hrsh7th/vim-vsnip-integ', + -- 'hrsh7th/cmp-vsnip', + -- 'hrsh7th/vim-vsnip', + -- 'hrsh7th/vim-vsnip-integ', + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', 'onsails/lspkind.nvim', { 'zbirenbaum/copilot-cmp', @@ -42,7 +44,8 @@ return { cmp.setup({ snippet = { expand = function(args) - vim.fn["vsnip#anonymous"](args.body) + --vim.fn["vsnip#anonymous"](args.body) + require('luasnip').lsp_expand(args.body) end, }, mapping = { @@ -65,7 +68,7 @@ return { }, sources = cmp.config.sources({ { name = 'nvim_lsp' }, - { name = 'vsnip' }, + { name = 'luasnip' }, { name = "copilot" }, }, { { name = 'buffer' },