Closed medwatt closed 2 years ago
Can you give us your minimal current config?
I could reproduce the issue, working on it
Thanks for reporting, it should be fixed now :)
Hey @smjonas I think he wanted to press <TAB>
confirm the selected entry and then <tab>
to jump to the next stop
If mapping the confirm
behavior to a different key then it's fine. But it would be more flexible if we introduce confirm
mapping in the compose then the user could combine it with whatever he wants. E.g
local function has_item_selected()
return cmp.visible() and cmp.get_selected_entry() ~= nil
end
-- The <Plug> mappings are defined in autoload/cmp_nvim_ultisnips.vim.
local actions = {
.....
select_item = {
condition = { has_item_selected },
command = { cmp.confirm }
}
....
}
Then in user mapping
["<Tab>"] = cmp.mapping(
function(fallback)
cmp_ultisnips_mappings.compose {"select_item", "jump_forwards"}(fallback)
end, {"i", "s"}),
@quangnguyen30192 That seems like a good idea. Maybe we can let users override the actions table like
mappings = {
actions = { ... }
}
But as I understand it, the original issue was still solved by the PR, right? Any comments, @medwatt?
The relevant part of my config is given below along with a screen recording. I currently have
Tab
mapped to just jump forward. When I'm inside a snippet and the completion menu pops up, pressingTab
does not automatically jump to the next place holder. Instead, it inserts a space. It's only after that that I can jump forward.