More snippet pruning
This commit is contained in:
committed by
Ian Roddis
parent
0c0ebe9d91
commit
37a3687496
@@ -723,16 +723,16 @@ mason_lspconfig.setup_handlers {
|
||||
-- [[ Configure nvim-cmp ]]
|
||||
-- See `:help cmp`
|
||||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
luasnip.config.setup {}
|
||||
-- local luasnip = require 'luasnip'
|
||||
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||
-- luasnip.config.setup {}
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
-- snippet = {
|
||||
-- expand = function(args)
|
||||
-- luasnip.lsp_expand(args.body)
|
||||
-- end,
|
||||
-- },
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noinsert',
|
||||
},
|
||||
@@ -749,8 +749,8 @@ cmp.setup {
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
-- elseif luasnip.expand_or_locally_jumpable() then
|
||||
-- luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
@@ -758,8 +758,8 @@ cmp.setup {
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
-- elseif luasnip.locally_jumpable(-1) then
|
||||
-- luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user