deoplete-clang
deoplete-clang copied to clipboard
deoplete-clang doesn't complete include content unless I reopen the file.
Problems summary
I'm using the deoplete + deoplete-clang + neoinclude. When my file #include <limits.h> and
I typing INT it will not show any completion candidates. If I reopen that file and typing INT
it will show completion candidates like INT_MAX and INT_MIN.
Expected
Completing include content without reopen the code file.
Environment Information
- OS: Arch Linux
- Neovim version: 0.1.4
Provide a minimal init.vim with less than 50 lines and not plugin manager (Required!)
" Your minimal init.vim
set runtimepath+=~/path/to/deoplete.nvim/
set runtimepath+=~/path/to/deoplete-clang/
let g:deoplete#enable_at_startup = 1
" Use smartcase
let g:deoplete#enable_smart_case = 1
" Let <Tab> also do completion
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
"close the preview window after completion is done.
autocmd CompleteDone * pclose!
" completion bracket
call deoplete#custom#set('_', 'converters', ['converter_auto_paren'])
" Deoplete-clang
let g:deoplete#sources#clang#libclang_path = '/usr/lib/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/lib/clang'
The reproduce ways from neovim starting (Required!)
#include <limits.h>
INT //will not show any completion candidates
save and reopen that file
#include <limits.h>
INT //will show completion candidates like INT_MAX and INT_MIN
I'm not sure it's deoplete-clang or other plugin's problems. Thanks for any help.
I think the problem is... https://github.com/zchee/deoplete-clang/issues/43#issuecomment-235557371
Hi there,
I am using neovim and freshest code for deoplete and deoplete-clang, and having the same problem. Completion from files included happens only after reopening the source file. This is happening regardless of the file included.
Does anyone have a clue? @XDXX have you solved the issue?
My setup
-
RedHat 7
-
Clang 3.4.2
-
NVIM v0.2.0
My init.vim (part of it)
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#clang#libclang_path= '/usr/lib64/llvm/libclang.so'
let g:deoplete#sources#clang#clang_header = '/usr/lib/clang'
let g:deoplete#sources#clang#sort_algo = 'priority'
set completeopt-=preview`
Thanks, Christian
@christian-pinto This problem still bothers me and I don't have andy clue about it. Hope @zchee will fix this issue soon.
deplete-clang2 exists. It has the same problem?
I have just tested deoplete-clang2, it works with the includes. In previous post I forgot to mention that I am also using neoinclude.
However deoplete-clang2 has another problem for me that is translation is not always performed. As an example i write mmap, nothing appears, then I delete some characters and type again and the mmap autocompletion from clang appears. This is annoying since everytime i need to back and forth typing and deleting in order to get the autocompletion.