Add support for VISUAL
anstadnik opened this issue · 1 comments
anstadnik commented
Ultisnips has a possibility to visually select some words, and then expand the snippet. The selected lines automatically appear in the ${VISUAL} placeholder.
Documentation for this
Is it possible to implement that in this plugin?
anstadnik commented
Since hrsh7th/nvim-cmp#438 this is possible:
vim.g.UltiSnipsExpandTrigger = '<Plug>(ultisnips_expand)'
...
cmp.setup {
snippet = {expand = function(args) vim.fn["UltiSnips#Anon"](args.body) end},
mapping = {
["<C-l>"] = cmp.mapping({
...
x = function()
vim.api.nvim_feedkeys(t("<Plug>(ultisnips_expand)"),
'm', true)
end
}),
...