Remove luasnip
This commit is contained in:
parent
37575bcd55
commit
0e6c03d0ed
2 changed files with 16 additions and 16 deletions
|
@ -105,15 +105,15 @@ M.cmp = function()
|
|||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
|
||||
-- luasnip setup
|
||||
local luasnip = require 'luasnip'
|
||||
-- local luasnip = require 'luasnip'
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
-- expand = function(args)
|
||||
-- require('luasnip').lsp_expand(args.body)
|
||||
-- end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
|
@ -129,8 +129,8 @@ M.cmp = function()
|
|||
['<Tab>'] = function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-n>', true, true, true), 'n')
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-expand-or-jump', true, true, true), '')
|
||||
-- elseif luasnip.expand_or_jumpable() then
|
||||
-- vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-expand-or-jump', true, true, true), '')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
@ -138,8 +138,8 @@ M.cmp = function()
|
|||
['<S-Tab>'] = function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-p>', true, true, true), 'n')
|
||||
elseif luasnip.jumpable(-1) then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-jump-prev', true, true, true), '')
|
||||
-- elseif luasnip.jumpable(-1) then
|
||||
-- vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-jump-prev', true, true, true), '')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
@ -149,7 +149,7 @@ M.cmp = function()
|
|||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'calc' },
|
||||
{ name = 'luasnip' },
|
||||
-- { name = 'luasnip' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lua' },
|
||||
{ name = 'spell' },
|
||||
|
@ -166,7 +166,7 @@ M.cmp = function()
|
|||
path = "[Path]",
|
||||
buffer = "[Buffer]",
|
||||
calc = "[Calc]",
|
||||
luasnip = "[LuaSnip]",
|
||||
-- luasnip = "[LuaSnip]",
|
||||
nvim_lsp = "[LSP]",
|
||||
nvim_lua = "[Lua]",
|
||||
spell = "[Spell]",
|
||||
|
|
|
@ -73,7 +73,7 @@ return require('packer').startup(function()
|
|||
require('lsp').cmp()
|
||||
end,
|
||||
requires = { -- nvim-cmp sources
|
||||
"saadparwaiz1/cmp_luasnip", --luasnip integration
|
||||
-- "saadparwaiz1/cmp_luasnip", --luasnip integration
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
|
@ -84,11 +84,11 @@ return require('packer').startup(function()
|
|||
"hrsh7th/cmp-look",
|
||||
}
|
||||
}
|
||||
use { -- code snippits
|
||||
"L3MON4D3/LuaSnip",
|
||||
-- "hrsh7th/vim-vsnip",
|
||||
-- "rafamadriz/friendly-snippets",
|
||||
}
|
||||
-- use { -- code snippits
|
||||
-- "L3MON4D3/LuaSnip",
|
||||
-- -- "hrsh7th/vim-vsnip",
|
||||
-- -- "rafamadriz/friendly-snippets",
|
||||
-- }
|
||||
use { -- function parameter previews
|
||||
"ray-x/lsp_signature.nvim",
|
||||
after = "nvim-lspconfig",
|
||||
|
|
Loading…
Add table
Reference in a new issue