-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vsnip does not work with lsp #24
Comments
You should add { name = 'vsnip' } to sources. |
BTW, Your reporting is much clear. Thanks! |
So don’t I need to set up `vsnip-integr` plugin? I thought I could ignore vsnip source since the snippets are coming from the lsp source…
… On 15 Aug 2021, at 11:59, hrsh7th ***@***.***> wrote:
BTW, Your reporting is much clear. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
You don't need to set up |
Do you mind to trying explain to me the purpose of `vsnip-integr`? I think I could ignore vsnip source altogether with it.
Thank you very much. It is working configuring it as a source…
… On 15 Aug 2021, at 12:55, hrsh7th ***@***.***> wrote:
You don't need to set up vim-vsnip-integ. If you want to show vsnip candidates to completion-menu, You just add sources = { { name = 'nvim_lsp' }, { name = 'vsnip' } } both.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
The The |
Hi @hrsh7th, sorry for disturbing you. I am migrating over from Appreciate if you can point me to debug further, thank you. This is the config local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
vim.fn['vsnip#anonymous'](args.body)
end
},
mapping = {
['<C-p>'] = cmp.mapping.prev_item(),
['<C-n>'] = cmp.mapping.next_item(),
['<C-d>'] = cmp.mapping.scroll(-4),
['<C-f>'] = cmp.mapping.scroll(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping.mode({ 'i', 's' }, function(_, fallback)
if vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-n>', true, true, true), 'n')
else
fallback()
end
end),
['<S-Tab>'] = cmp.mapping.mode({ 'i', 's' }, function(_, fallback)
if vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-p>', true, true, true), 'n')
else
fallback()
end
end),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'vsnip' },
},
} |
@marcushwz Did you install |
@hrsh7th, Didn't know about that. Just did that and it works now, thank you so much, and have a great day! |
hey guys, i have problem that i can't use my custom snippet from ~/.vsnip/. please help me guys! |
How can I get vsnip to work with nvim-cmp-lsp?
plugins:
config:
~/.vsnip/global.json
:results in a json file:
The text was updated successfully, but these errors were encountered: