clj-suitable icon indicating copy to clipboard operation
clj-suitable copied to clipboard

Auto-complete destroys *1 *2 *3 special bindings

Open thheller opened this issue 6 years ago • 2 comments

$ clj -Asuitable
2019-10-08 01:06:51.710:INFO::main: Logging initialized @4424ms to org.eclipse.jetty.util.log.StdErrLog
[Figwheel] Compiling build dev to "target/public/cljs-out/dev-main.js"
...
[Rebel readline] Type :repl/help for online help info
Opening URL http://localhost:9500
Failed to open browser: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
ClojureScript 1.10.520
cljs.user=> (def x 1)
#'cljs.user/x
cljs.user=> js/document
#object[HTMLDocument [object HTMLDocument]]
cljs.user=> *2
({:name "document", :hierarchy 0, :type "var"})
cljs.user=>

*2 should be the #'cljs.user/x var but isn't if I pressed TAB during js/doc|.

Minor issue but seems like it shouldn't be touching those. Might be possible to get rid of this effect with a custom :wrap-fn. Not currently possible in shadow-cljs though.

thheller avatar Oct 07 '19 23:10 thheller

Good point, thanks, I'll look into it.

rksm avatar Oct 11 '19 12:10 rksm

In nREPL you might be able to do the evaluations in a dedicated nREPL sessions potentially. That's how CIDER avoids clobbering results for internal Clojure evaluations. Not sure how easy that'd be with Piggieback, though. Might be another thing worth mentioning in the README.

bbatsov avatar Jan 20 '20 08:01 bbatsov