Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting clang completion immediately #17

Open
ghost opened this issue Jul 13, 2017 · 6 comments
Open

Not getting clang completion immediately #17

ghost opened this issue Jul 13, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 13, 2017

Hi,

I am using this plugin for C/C++ programming and I think it is great, especially for the parameters placeholders that avoid the sometimes annoying switches between tabs to have a look at man.

However, I noticed that the translation is not immediate/automatic: let's say I want to type mmap (includes are there already). What happens is that I don't get the clang completion immediately but I have to type a space in the middle of the word then go back and continue typing. Only now the clang completion appears. This is quite annoying since I would like to get the completion in realtime.

Anyone having the same issue?

Currently using nvim 0.2.0, clang 4.0 (tested also with 3.4.2 and seen the same behavior) and latest deoplete and deoplete-clang2 sources.

My init.vim

let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#clang#sort_algo = 'priority'
set completeopt-=preview

Thanks,

Christian

@doubleloop
Copy link

doubleloop commented Oct 23, 2017

same issue here (debian, NVIM v0.2.1-944-g77f1392f0, clang version 3.8.1-24, latest deoplete/deoplete-clang2), any update?

@aswinmohanme
Copy link

Same Issue, on Fedora 26

@arecarn
Copy link

arecarn commented Nov 22, 2017

same issue:
Ubuntu 16.04
NVIM v0.2.3-dev
clang version 3.8.0-2

pull request #20 does appear to fix this

@Shougo
Copy link
Contributor

Shougo commented Feb 8, 2018

Hi, I am deoplete author.
I have reproduced the problem.

But you can configure it manually.

call deoplete#custom#source('clang2', 'min_pattern_length', 2)

@Synray
Copy link

Synray commented Apr 10, 2018

Any fix for this issue? Using Arch linux with nvim 0.2.3, clang 6.0.0, latest deoplete & deoplete-clang2 (installed with vim-plug)
I'm getting the same problem as OP. I don't immediately get completion from clang when I start typing a word. I've tried a few different configurations.
Here's my default:

" deoplete
let g:deoplete#enable_at_startup = 1
" deoplete-clang                                                          
let g:deoplete#sources#clang#autofill_neomake = 1                         
let g:deoplete#sources#clang#executable = '/usr/bin/clang'                
let g:deoplete#sources#clang#clang_header = '/usr/lib/clang/6.0.0/include'

With the default config, clang completion only appears after typing 'space BS' or typing '.' or '->' . Member/struct completion works however.

When I test this with struct point {int x; int y;} point1;, as I start to type point1, no clang completion shows. When I type point1. it successfully shows point1's members as options.

When I add
call deoplete#custom#source('clang2', 'min_pattern_length', 2)
Testing the same structure, as I start to type point1, clang completion shows point1 as an option. But now when I type point1., there are no members shown as options anymore. I might look through the source for anything obvious but I'm not quite sure how to debug a plugin.

@Shougo
Copy link
Contributor

Shougo commented Apr 14, 2018

You can use deoplete-clangx instead.
https://github.com/Shougo/deoplete-clangx

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

No branches or pull requests

5 participants