-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
YCM should query Vim's omnicomplete system if available #3
Comments
Yes, I am aware of this; this is why YCM provides an internal Completer API so that semantic completers for other languages can be written. A YCM is barely 1.0 at this point and hopefully will provide great semantic completion for many languages. If you wish to implement some of them, I'd be happy to merge such pull requests. Thanks for your comments! |
Yeah that engine would be the "money maker" for this plugin. |
@Valloric It there some hacking guide on how to start implementing own completer? I'm thinking of contribute, but I don't see much info. |
@seletskiy Those are docs I've yet to write, but it's coming. :) For now, take a look in the Let's say you want to write a completer for PHP. You'd create a There's still no easy way to have YCM do the sorting and filtering for you, but tomorrow I'll add a function that when provided with a list of completion strings and a user query will returned a filtered and sorted list back. |
@Valloric Thanks! I'm will try to dig in soon... |
This is now officially implemented as of commit dbad91e! See the updated docs for details, but in short, YCM now uses Vim's omnicomplete data to provide semantic completions for every language Vim has omnicomplete support for. |
@Valloric I'm using it with vimerl, it registers the completefunc and I think YCM uses it correctly when it is automaticaly fired. But then when typing it stops using the completefunc results and switches to fuzzy completion. What I want YCM to do is to continue using only results from completefunc because only that results are semanticaly correct here. |
It needs to register the omnifunc, not the completefunc. It's also possible you need to add |
Sorry, my mistake, it is omnifunc that is set (to erlang_complete#Complete), not the completefunc. Semantic trigger is also set to ':'. |
@tex I'm having the same problem. Did you manage to fix it? |
No I didn't. Just gave up. Sorry. |
Add infolog to default filetype blacklist.
Also added explicit check for it, since the dependency is non-obvious (see ycm-core#3).
…lang installed. Closes ycm-core#3
Currently, YCM seems to only support keyword completion for languages outside the C Family (tested with PHP, JS, CSS and Python). While this completion mechanism may have its merits it is quite dumb. Omni completion generally provides much more useful suggestions. You can compare these two screenshots to get an idea…
YCM:
Omni completion:
Additionally, the message in the command-line says "User defined completion" but
:set completefunc=javascriptcomplete#CompleteJS
(tested to work with<C-x><C-u>
) doesn't seem to have any effect whatsoever: only keyword completion is used.Thanks for your attention.
The text was updated successfully, but these errors were encountered: