Comments (24)
neovim nightly is not supposed to be stable. yeah surely it will be hiccup sometimes
from cmp-nvim-ultisnips.
@captainko this is how the guys here hrsh7th/nvim-cmp#241 (comment) fix it
use {'honza/vim-snippets', rtp = '.'}
from cmp-nvim-ultisnips.
completion = { completeopt = "menu,menuone,noinsert" }, -- removing this has helped the supertab to work
That's weird, this is the setting recommended by cmp author
Can you try with
["<S-Tab>"] = cmp.mapping(function(fallback)
if vim.fn["UltiSnips#CanJumpBackwards"]() == 1 then
return vim.fn.feedkeys(t("<ESC>:call UltiSnips#JumpBackwards()<CR>"))
elseif vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(t("<C-p>"), "n")
else
fallback()
end
end
from cmp-nvim-ultisnips.
you had better ask ultisnips author. IMO Ultisnips is more way friendly, easy to learn, versatile and has rich support from overall languages. Probably comparing to the other snippet engines, it slows, but how much is it?
I have been using ultisnips for 3 years and had no problem with performance, If your laptop is not produced in 1970 then I would say just use it
from cmp-nvim-ultisnips.
Sure, since the root cause was fixed, we don't need that in the readme
from cmp-nvim-ultisnips.
Thanks, I will check
from cmp-nvim-ultisnips.
please see hrsh7th/nvim-cmp#241 (comment)
from cmp-nvim-ultisnips.
I think we should report this issue at UltiSnippets repo instead. As I notice earlier that my local snippets are still get sourced but not the ones provided by the vim-snippets
.
from cmp-nvim-ultisnips.
Just installed neovim nightly and there are many plugins installed on my machine stop working
from cmp-nvim-ultisnips.
Let's see if I could do something from cmp-nvim-ultisnips's side
from cmp-nvim-ultisnips.
Oh thanks, It works like charms.
from cmp-nvim-ultisnips.
I think this is it.. neovim/neovim#15632
from cmp-nvim-ultisnips.
@rebelot thank you use {'honza/vim-snippets', rtp = '.'} helped resolved the issue
However @quangnguyen30192 I also noticed that the I am not able to circulate the snippet placeholders using tabs like it was working before. Its not even working in the neovim stable release. When I am typing in the snippet placeholder the autocompletes are popping up while I am typing. On completion I am not able to use the tabs to move to the next placeholder.
from cmp-nvim-ultisnips.
However @quangnguyen30192 I also noticed that the I am not able to circulate the snippet placeholders using tabs like it was working before. Its not even working in the neovim stable release. When I am typing in the snippet placeholder the autocompletes are popping up while I am typing. On completion I am not able to use the tabs to move to the next placeholder.
You’re welcome, maybe opt=true
should also work and might be more elegant. My two cents on “supertab”: just use <c-j>/<c-k>
and stop bothering rewriting your config every other day. After a few hours you think it’s working, then you notice macros don’t work anymore, you manage to fix it, then you update neovim or cmp and you have to start again. The amount of issues and config bloatware related to tab mappings is fenomenal.
from cmp-nvim-ultisnips.
@rebelot I have tried putting opt=true but doesn't seem to be working - I have tried use {'honza/vim-snippets', rtp = '.', opt=true}
Am I correct in doing it . Pardon me if this is a trivial clarification. I am new to this.
from cmp-nvim-ultisnips.
@Trid-collab probably you need to set
vim.g.UltiSnipsRemoveSelectModeMappings = 0
or
let g:UltiSnipsRemoveSelectModeMappings = 0
from cmp-nvim-ultisnips.
The done the same but still the place holder issue remains. I was also reverted back to the stable version
This is my plugin setup
use({
"SirVer/ultisnips",
requires = { "honza/vim-snippets" },
config = function()
vim.g.UltiSnipsRemoveSelectModeMappings = 0
end,
})
and my cmp mapping setup
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true,
}),
["<C-Space>"] = cmp.mapping(function(fallback)
if vim.fn.pumvisible() == 1 then
if vim.fn["UltiSnips#CanExpandSnippet"]() == 1 then
return vim.fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
end
vim.fn.feedkeys(t("<C-n>"), "n")
elseif check_back_space() then
vim.fn.feedkeys(t("<cr>"), "n")
else
fallback()
end
end, {
"i",
"s",
}),
["<Tab>"] = cmp.mapping(function(fallback)
if vim.fn.complete_info()["selected"] == -1 and vim.fn["UltiSnips#CanExpandSnippet"]() == 1 then
vim.fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>"))
elseif vim.fn["UltiSnips#CanJumpForwards"]() == 1 then
vim.fn.feedkeys(t("<ESC>:call UltiSnips#JumpForwards()<CR>"))
elseif vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(t("<C-n>"), "n")
elseif check_back_space() then
vim.fn.feedkeys(t("<tab>"), "n")
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if vim.fn["UltiSnips#CanJumpBackwards"]() == 1 then
return vim.fn.feedkeys(t("<C-R>=UltiSnips#JumpBackwards()<CR>"))
elseif vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(t("<C-p>"), "n")
else
fallback()
end
end, {
"i",
"s",
}),
},
from cmp-nvim-ultisnips.
@quangnguyen30192 I have reverted back to neovim stable. The Ultisnips are showing in the autocomplete now and am able to select.
But the supertab option is not working - in order to circulate between the placeholders. I have tried following the setup in your readme. Whenever I am trying to type something in the placement autocomplete is poping up which I believe hindering the circulation through the placeholders
from cmp-nvim-ultisnips.
Hey thanks, checking it now
from cmp-nvim-ultisnips.
found out the offending piece of code in cmp setup which was not allowing the tab to work
completion = { completeopt = "menu,menuone,noinsert" }, -- removing this has helped the supertab to work
But even then S-Tab is working weirdly Could you check- Basically when I am circulating back using the S-Tab its going to immediate earlier placeholder but then if we don't re type the placeholder and simply want to go the next above it deletes the placeholder. So say suppose if I am using ife and I come to the last placeholder and want to change the topmost one without changing the second one in between doing S-Tab deletes the one in between which has not been changed
This doesn't happen when using @rebelot's suggestions C-K to go backwards
from cmp-nvim-ultisnips.
Perfecto. It works. like C-K
Just one question whenever I doing a forward jump or backward jump on the placeholder its printing :call UltiSnips#JumpForward or :call UltiSnips#JumpBackward
Thank you for the quick revert
completion = { completeopt = "menu,menuone,noinsert" }, -- removing this has helped the supertab to work
That's weird, this is the setting recommended by cmp author
You are right I put it after seeing it on the cmp site
Also a question to you and @rebelot does using Utlisnip slow down language server especially pyright compared to Luasbip or others.
I have started liking UltiSnip more because its more rich in snippet options
from cmp-nvim-ultisnips.
Thank you
from cmp-nvim-ultisnips.
Just one question whenever I doing a forward jump or backward jump on the placeholder its printing :call UltiSnips#JumpForward or :call UltiSnips#JumpBackward
not sure if cmp mapping support silent
mode
from cmp-nvim-ultisnips.
@captainko this is how the guys here hrsh7th/nvim-cmp#241 (comment) fix it
use {'honza/vim-snippets', rtp = '.'}
@quangnguyen30192 Is this workaround still needed since neovim/neovim#15632 has been merged a while ago? I haven't noticed any problems with vim-snippets while not setting the rtp manually. Can we remove that section from the readme?
from cmp-nvim-ultisnips.
Related Issues (20)
- Disabling autotrigger causes error HOT 9
- broken UltiSnips HOT 6
- Having issues with nested tabstop HOT 1
- No snippets in completion list? HOT 3
- Update support for new lua parser in treesitter HOT 3
- Strange error when trying to load ultisnips HOT 5
- Expand Snippet shows on the command line HOT 6
- When cmp is active, jump forward doesnt go forward. HOT 7
- Using tab to jump forward leaves a space before jumping forward HOT 6
- Snippetes with multiple options doesn't works HOT 1
- Possible bug when triggering snippet before the completion menu has opened for the first time
- Wrong context matching HOT 5
- If i set jump_forwards before expand, it has a lag before i can expand HOT 8
- Error detected while processing TextChangedI Autocommands for "*": HOT 16
- Not showing all honza/vim-snippets (but it still exists somehow) HOT 12
- Failed to load parser: uv_dlsym: dlsym(0x208d77c60, tree_sitter_Dockerfile): symbol not found HOT 1
- Many auto-snippets can not be trigger HOT 1
- E5108: Error executing lua Vim:E117: Unknown function: `UltiSnips#CanJumpForwards`, `UltiSnips#CanJumpBackwards`, and `UltiSnips#CanExpand` HOT 21
- Error detected while processing TextChangedI Autocommands for "*": HOT 4
- Ultisnips stopped working HOT 1
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 cmp-nvim-ultisnips.