Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Completion shows part of the snippet #221

Open
MichaelWJung opened this issue Apr 23, 2018 · 1 comment
Open

Completion shows part of the snippet #221

MichaelWJung opened this issue Apr 23, 2018 · 1 comment

Comments

@MichaelWJung
Copy link

The following gif explains my problem best:
completion

When I go through the list of available completions I will always see part of the snippet code in the buffer. As soon as I press the completion keys, UltiSnips is triggered correctly, though. This is kind of annoying if I don’t want to use snippets in some situations. Is this a known issue? Anything I’m doing wrong here?

I use neovim v0.2.2 on Linux with the cquery language server. All plugins are up to date. I can reproduce the issue with the following minimal init.vim:

call plug#begin('~/.local/share/nvim/plugged')
Plug 'autozimu/LanguageClient-neovim', {
    \ 'branch': 'next',
    \ 'do': 'bash install.sh',
    \ }
Plug 'roxma/nvim-completion-manager'
Plug 'SirVer/ultisnips'
call plug#end()


let g:UltiSnipsSnippetsDir = $HOME."/.config/nvim/UltiSnips/"
let g:UltiSnipsJumpForwardTrigger = "<C-J>"
let g:UltiSnipsJumpBackwardTrigger = "<C-K>"

let g:UltiSnipsExpandTrigger = "<Plug>(ultisnips_expand)"
inoremap <silent> <c-j> <c-r>=cm#sources#ultisnips#trigger_or_popup("\<Plug>(ultisnips_expand)")<cr>


inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")


let g:LanguageClient_settingsPath = $HOME.'/.config/nvim/settings.json'
let g:LanguageClient_serverCommands = { 'cpp': ['cquery', '--language-server'] }
let g:LanguageClient_loadSettings = 1
@MichaelWJung
Copy link
Author

The following change fixes the problem, but I have no idea if this is really the right way to do it:
MichaelWJung@6733f39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant