[C-d in .cljs files

43 views
Skip to first unread message

Olle Romo

unread,
Jul 13, 2013, 12:42:26 PM7/13/13
to vimcl...@googlegroups.com
Hi,
I'm new to clojure and clojurescript so this is probably obvious to all, but I can't seem to get [C-d to find source in .cljs files. It works great in .clj files. Is there something I can add in the vimrc, or is it more complicated? I'm working my way thru the excellent new pedestal tutorial and I did set CLOJURESCRIPT_HOME...

Thanx much in advance,
Olle

guns

unread,
Jul 13, 2013, 5:24:14 PM7/13/13
to vimcl...@googlegroups.com, Olle Romo
Fireplace.vim is an nREPL client, and nREPL does not support CLJS out of
the box. From what I understand, Chas Emerick has been doing some work
to bridge nREPL and the CLJS REPL:

https://github.com/cemerick/piggieback

I haven't been doing much work on the web recently, but I plan on
checking this out when I get the chance.

guns

Chas Emerick

unread,
Jul 13, 2013, 8:14:40 PM7/13/13
to vimcl...@googlegroups.com
Piggieback is a small piece of the solution, but it's quite a bit more low-level than the stuff that will eventually be needed to support e.g. go-to-declaration. That is (roughly) a very simple runtime metadata lookup in Clojure, implementing it for ClojureScript will require talking to / inspecting the state of the ClojureScript analyzer environment that you've been using to compile your cljs.

My hope is that a common nREPL operation (or set of them) can be settled on to cover go-to-declaration (and all manner of other common tasks) so that an nREPL client that supports such operations will Just Work regardless of the language involved (just like eval and load-file just work now for Clojure and ClojureScript + piggieback, even for nREPL clients that don't know they're talking to a cljs REPL).

- Chas

Olle Romo

unread,
Jul 14, 2013, 5:44:03 AM7/14/13
to vimcl...@googlegroups.com
Thanks for you quick replies.

Is it possible to use some temporary fix with ctags on .jar files? I've googled around on that and it looks like it could be possible but I can't seem to find any details on how to make it  work. I guess I'd need a local copy of the source files...

Chas - I'm in the middle of 'Clojure Programming'. Great book!! :)

Best,
Olle
Reply all
Reply to author
Forward
0 new messages