Clojure icon indicating copy to clipboard operation
Clojure copied to clipboard

Make autocompletion awesome

Open cldwalker opened this issue 10 years ago • 4 comments

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 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
  • [ ] @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.

cldwalker avatar Oct 22 '14 22:10 cldwalker

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.

joshuafcole avatar Oct 22 '14 22:10 joshuafcole

We should consider switching from clojure-complete to compliment as it may give us some of the above

cldwalker avatar Nov 24 '14 13:11 cldwalker

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.

rundis avatar Apr 16 '15 07:04 rundis

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.

sbauer322 avatar Sep 25 '16 21:09 sbauer322