-
Notifications
You must be signed in to change notification settings - Fork 10
Completion metadata #15
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
Conversation
Great work! Ideally @alexander-yakushev would add the same behaviour to compliment soon as well! |
Can anyone tell me the different between :candidate and :name? |
Sorry - didn't include enough examples to make it clear :-). ({:candidate "cljs.core.async.macros/go" :ns cljs.core.async.macros :name cljs.core.async.macros/go :type :macro}
{:candidate "cljs.core.async.macros/go-loop" :ns cljs.core.async.macros :name cljs.core.async.macros/go-loop :type :macro}) and for prefix ({:candidate "doseq" :ns cljs.core :name cljs.core/doseq :type :macro}) So basically the values of |
Happy to remove |
Seems your original examples was wrong - as |
Don't worry, I'm asking this for myself because @bbatsov won't give me a break :D. So Bozhidar is this something you want from Compliment too? |
@alexander-yakushev Yes. I think I created a ticket for this half a year ago. It will make it possible for us to have richer completion metadata (e.g. in company, ac, etc). See alexander-yakushev/compliment#16 |
Yep, well spotted - I lied about |
@bbatsov I specifically mean :name and :candidate distinction. |
We can probably just omit |
a8b0fc4
to
c64754e
Compare
Okay, patch updated with
|
👍 Let's merge this! P.S. While you're on the subject of small tweaks - you might improve the README as well. :-) |
Will take a look tomorrow. Thanks! On Fri Feb 27 2015 at 2:28:34 PM Bozhidar Batsov [email protected]
|
c64754e
to
161506f
Compare
Great work! |
cc @bbatsov @gtrak
As discussed in #12. This is a breaking change but it would be easy to keep the old behaviour and add a new function for this.
See the tests for more examples but
completions
now returns a sequence that looks like this:The possible values of
:type
are:If there are multiple candidates with the same value of
:candidate
(i.e. any of the fns incljs.core
that wrap macros with the same name), then only one will be used - the one that would be returned by aninfo
call for the value of:candidate
(i.e. order of preference is the same as the list above).Not sure if we should force the client to account for all of the possible types or collapse them down a bit?