maralla / completor.vim

Async completion framework made ease.
MIT License
1.29k stars 63 forks source link

Snippest are not triggered after completion selection #178

Open Posto578 opened 6 years ago

Posto578 commented 6 years ago

When I try to confirm a completion candidate with return it doesn't invoke snippet. whimsicalanotherkarakul-size_restricted

vimrc settings:

set nu
filetype plugin on
inoremap jj <esc>
map <space> /
map <c-space> ?
vnoremap . :norm.<CR>
noremap <C-s> :update<CR>
set incsearch
set nohlsearch

abbr consider //consider the following statement

call plug#begin()
Plug 'maralla/completor.vim'
Plug 'jacoborus/tender.vim'
Plug 'kien/ctrlp.vim'
Plug 'vim-scripts/taglist.vim'
Plug 'junegunn/vim-easy-align'
Plug 'honza/vim-snippets'
Plug 'SirVer/ultisnips'
call plug#end()

:set guifont=Monospace\ 12

let g:completor_clang_binary = '/usr/bin/clang'
let g:clang_library_path = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib'
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"

"EasyAlign settigns
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)

" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)

" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

if (has("termguicolors"))
 set termguicolors
endif

" Theme
syntax enable
colorscheme tender

If I remove let g:clang_library_path = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib' I get error: image

If you need further information please let me know.

adelarsq commented 6 years ago

Did notice the same problem. The problem is that with custom maps configs UltiSnips don't trigger. May be that removing this lines solve the problem:

let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
maralla commented 6 years ago

The commit ed06e70ba0134d9265bf9ca560d166dbab6d1fce added the ability to jump to placeholders.

Use tab to jump to placeholder:

map <buffer> <tab> <Plug>CompletorCppJumpToPlaceholder
imap <buffer> <tab> <Plug>CompletorCppJumpToPlaceholder
Miszo97 commented 6 years ago

@maralla I' am afraid there is an issue with correctly placeholder selection. #184