Clojure
Clojure copied to clipboard
Make autocompletion awesome
This is a meta issue to track clojure(script) autocompletion scenarios I'd like for us to handle (will keep up to date). I'd love for us to be as good if not better than lein repl
and any editor out there:
- [ ] namespaces e.g.
lt.objs.com[TAB]
completes withlt.objs.command
- [ ] ns vars e.g.
lt.objs.command/com[TAB]
completes withcommand
andcompletions
- [ ] clojure.core/cljs.core fns e.g.
cond-[TAB]
completes withcond->
andcond->>
- [ ] java classes e.g.
java.io.StringR[TAB]
completes tojava.io.StringReader
- [ ] goog.* libraries e.g.
goog.ob[TAB]
completes togoog.object
- @swannodette has good things to say about this and more on cursive
- [ ] js methods e.g.
goog.object.getK[TAB]
completes togoog.object/getKeys
- This may have overlap with ns vars depending on implementation.
- [ ] js top level variables e.g.
js/win[TAB]
completes tojs/window
- [ ] @word[TAB]another-word - another word prevents completions of @word
I'm happy to guide anyone on these. Good place to start looking is this file.
Seconding the importance of this one. It'll be great when our editor has completion on par for it's native language as it has for it's sibling language. :)
On Wed, Oct 22, 2014 at 3:28 PM, Gabriel Horner [email protected] wrote:
This is a meta issue to track clojure(script) autocompletion scenarios I'd like for us to handle (will keep up to date). I'd love for us to be as good if not better than lein repl and any editor out there:
- namespaces e.g. lt.objs.com[TAB] completes with lt.objs.command
- ns vars e.g. lt.objs.command/com[TAB] completes with command and completions
- clojure.core/cljs.core fns e.g. cond-[TAB] completes with cond-> and cond->>
- java classes e.g. java.io.StringR[TAB] completes to java.io.StringReader
- goog.* libraries e.g. goog.ob[TAB] completes to goog.object
- @swannodette https://github.com/swannodette has good things to say about this and more on cursive
- js methods e.g. goog.object.getK[TAB] completes to goog.object/getKeys
- This may have overlap with ns vars depending on implementation.
- js top level variables e.g. js/win[TAB] completes to js/window
I'm happy to guide anyone on these. Good place to start looking is this file https://github.com/LightTable/Clojure/blob/master/lein-light-nrepl/src/lighttable/nrepl/auto_complete.clj .
— Reply to this email directly or view it on GitHub https://github.com/LightTable/Clojure/issues/25.
Screw the environment. Please print this email immediately. And then burn it.
We should consider switching from clojure-complete to compliment as it may give us some of the above
A quick route here might (just might) be to consider incorporating the cider-nrepl middleware. This is what I did in the clj-refactor-plugin, but would love to be able to remove the precondition of manually setting up cider-nrepl as a dep when connecting (not the remote nrepl obviously) through LT.
While on the Clojurians Slack today, I was able to garner some feedback regarding Light Table from a user's perspective and this is a significant pain point. Emacs has a superior autocomplete in Cider. Recommend making it a priority.