Closed s-daveb closed 2 years ago
Probably because of this line: let g:UltiSnipsExpandTrigger="<c-l>"
@Pedrobc89 I can see how you would say that, but that was my workaround to get UltiSnip functionality while <TAB>wasn't working. I should have removed that before filing this bug report.
In either case, I tested it again with the latest versions of all my plugins, and the UltiSnips provider is working with <TAB> again. 🥳
Marking this as closed/solved.
Hey man, just wanted to chime in if anyone is in a similar situation.
I think the takeaway from this issue is that this plugin only populates sources (completion results), (please correct me if I'm wrong)
You can achieve snippet expansion from menu by:
" vim8/legacy
function! ExpandSnippetOrReturn()
let snippet = UltiSnips#ExpandSnippetOrJump()
if g:ulti_expand_or_jump_res > 0
return snippet
else
return "\<C-Y>" " select without newline in popup
endif
endfunction
inoremap <expr> <CR> pumvisible() ? "<C-R>=ExpandSnippetOrReturn()<CR>" : "\<CR>"
vim9script
def g:ExpandSnippetOrReturn(): string
var snippet = UltiSnips#ExpandSnippetOrJump()
if g:ulti_expand_or_jump_res > 0
return snippet
else
return "\<C-Y>" # select without newline in popup
endif
enddef
inoremap <expr> <CR> pumvisible() ? "<C-R>=ExpandSnippetOrReturn()<CR>" : "\<CR>"
When i register this as a completion source and try to select a snippet and hit
<enter>,
nothing happens.my .vimrc contains
Is this plug-in deprecated?
The documentation for asyc.vim says to use this repository for snippets, and the documentation for vim-lsp.vim says to use thomasfaingnaert/vim-lsp-ultisnips.