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

doesn't work with youcompleteme #2

Open
mar04 opened this issue Apr 28, 2014 · 9 comments
Open

doesn't work with youcompleteme #2

mar04 opened this issue Apr 28, 2014 · 9 comments

Comments

@mar04
Copy link

mar04 commented Apr 28, 2014

It doesn't seem to work with youcompleteme plugin.

@xaizek
Copy link
Owner

xaizek commented Apr 28, 2014

I don't have it installed, so can't check it right away. According to README file youcompleteme is able to perform file-completion inside strings, which might cause issues. You could try setting:

let g:ycm_complete_in_strings = 0

Not sure it'll fix the issue, anyway I'll check what might be wrong.

@xaizek
Copy link
Owner

xaizek commented Apr 29, 2014

The issue is that youcompleteme may override other completion plugins. I've made some adjustments to the way inccomplete is initialized to work around this. Please try it as I'm not sure youcompleteme will function properly (it takes too much effort to completely install and configure it).

One important note: you need inccomplete to be initialized after youcompleteme. It should be the case if youcompleteme is named as YouCompleteMe, otherwise try renaming it or inccomplete directory.

@mar04
Copy link
Author

mar04 commented Apr 29, 2014

Can't get it to work. Actually that latest commit seems to break inccomplete when youcompleteme is not loaded at all.
From scriptnames optput:

36: ~/.vim/bplugins/YouCompleteMe/plugin/youcompleteme.vim
95: ~/.vim/bplugins/vim-inccomplete/plugin/inccomplete.vim
150: ~/.vim/bplugins/YouCompleteMe/autoload/youcompleteme.vim

@xaizek
Copy link
Owner

xaizek commented Apr 29, 2014

It should work fine with this order of scripts. inccomplete also still works for me without youcompleteme.

Could you post output of the following command inside source file with/without youcompleteme plugin:

set omnifunc? completefunc?

@xaizek
Copy link
Owner

xaizek commented Apr 29, 2014

I reproduced your issues, looks like you were trying completion on file passed on the command line, which didn't work. Pushed new commit that addresses the problem and might fix it.

@mar04
Copy link
Author

mar04 commented Apr 29, 2014

Yes, that was it. Now it works. One minor issue: fuzzy and case insensitive searching doesn't work. I don't know how inccomplete interacts with ycm and if it is possible to fix that.

@xaizek
Copy link
Owner

xaizek commented Apr 30, 2014

You mean fuzzy and case insensitive searching of include directives? If yes, then it won't work.

Here how it works: inccomplete tries to complete header and calls ycm when fails (e.g. completion outside include directive). ycm knows nothing about inccomplete and its completions so you can't use its features for matches discovered by inccomplete. For proper interaction inccomplete probably needs to be reimplemented as part of ycm or expose some kind of interface suitable for ycm, but I don't know what would it take.

@mar04
Copy link
Author

mar04 commented Apr 30, 2014

I see. Is there a chance you would reimplement it as part of ycm? Ycm already has a filepath completion, and it even fires up for local includes, it just doesn't filter headers. I think it wouldn't be too hard to make it work.

@xaizek
Copy link
Owner

xaizek commented Apr 30, 2014

I'm sorry, but it's unlikely. I don't use ycm and have no plans on using it in the future.

I would accept changes that allow inccomplete to be used both with and without ycm. Simpler solution would be to just make it require ycm in a fork. Nevertheless, there is a possibility that I'll check API of YCM and implement this support myself (I suspect writing some kind of wrapper would be enough), but I don't promise that.

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

2 participants