Comments (9)
The vim-vsnip-integ
supports vim-lsp
, vim-lsc
, neovim builtin lsp omnifunc
etc.
The nvim-cmp
has a customizable snippet configuration point, so it is not needed.
from nvim-cmp.
@hrsh7th, Didn't know about that. Just did that and it works now, thank you so much, and have a great day!
from nvim-cmp.
You should add { name = 'vsnip' } to sources.
from nvim-cmp.
BTW, Your reporting is much clear. Thanks!
from nvim-cmp.
from nvim-cmp.
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.
from nvim-cmp.
from nvim-cmp.
Hi @hrsh7th, sorry for disturbing you.
I am migrating over from nvim-compe
and having the same problem where nvim-cmp
does not show snippets from vsnip + friendly-snippets
. I have already added vsnip
to the sources but it still does not work.
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' },
},
}
from nvim-cmp.
@marcushwz Did you install cmp-vsnip
source via your plugin manager?
from nvim-cmp.
Related Issues (20)
- Minimum number of chars for completion
- Using Semantic Versioning releases HOT 2
- Icons are not displayed correctly
- cmp don't work even my config are seem to be correct HOT 2
- Hitting CR confirm selection on cmdline weird redraw on neovim 0.10 HOT 1
- attempt to call local 'fn' (a table value) HOT 7
- Ghost Text Errors HOT 1
- feature request: documentation treesitter syntax highlight like `vim.lsp.buf.signature_help()` in nvim 0.10
- Some times vim_item.kind is nil
- snippet getting confirm and not preselect when doing cmp.select_next_item HOT 3
- cmp-omni listed under unavailable source names HOT 8
- ":%normal Itest" executes slowly when there are many rows
- Better documentation around fuzzy and partial matching options
- vim.tbl_add_reverse_lookup is deprecated HOT 4
- please make the lowest sponsoring tier as low as $2
- Completion for tailwind language server has some delay, but it is works fine in other programming languages HOT 2
- nvim_get_option_value calls break compatibility with neovim 0.7
- Hover documentation border will not work HOT 3
- auto completion change to manual completion occasionally HOT 2
- error when using completion with gopls language server in neovim 0.10.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-cmp.