Overloading Keymaps (Switch Choice/Dynamic Node External Update) #885
Answered
by
L3MON4D3
evesdropper
asked this question in
Q&A
-
I was thinking about using the same mapping for changing choices and dynamic node external update. Is there a way to create a mapping that does so - somewhat like nvim-cmp's super-tab functionality? I was thinking something like: -- psuedocode
vim.keymap.set("i", "<key>", function ()
if active choicenode then
<Plug>luasnip-next-choice
else
dynamic node external update
end
end Is this possible, and if so, how would I make it work? |
Beta Was this translation helpful? Give feedback.
Answered by
L3MON4D3
May 10, 2023
Replies: 1 comment 8 replies
-
I think you pretty much have it, use |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
evesdropper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you pretty much have it, use
ls.choice_active()
,ls.change_choice(1)
and_G.dynamic_node_external_update(i)
instead of the placeholders, and it should work