- Notifications
You must be signed in to change notification settings - Fork10
clojure-emacs/cljs-tooling
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DEPRECATION NOTICE: This project's functionality is now part oforchard
(var info) andclj-suitable
(code completion).
A Clojure library designed to provide tooling support forClojureScript. Currently it provides var info and auto-completionbased on the ClojureScript compiler state.
It is the basis for ClojureScript features incider-nrepl (and inCIDER respectively), including source navigation and auto-completion,but is separate for the sake of test-harnesses and decoupleddevelopment.
With Leiningen:
[cljs-tooling "0.3.1"]
cljs-tooling.info> (info @cljs.env/*compiler* 'go 'cljs.core.async)=> {:ns cljs.core.async.macros:doc"Asynchronously executes the body, returning immediately to the\n calling thread. Additionally, any visible calls to <!, >! and alt!/alts!\n channel operations within the body will block (if necessary) by\n 'parking' the calling thread rather than tying up an OS thread (or\n the only JS thread when in ClojureScript). Upon completion of the\n operation, the body will be resumed.\n\n Returns a channel which will receive the result of the body when\n completed":file"cljs/core/async/macros.clj":column1:line4:name go:arglists ([& body])}
;; env is pulled from cljs compiler statecljs-tooling.complete> (completions @cljs.env/*compiler*"al" 'cljs.core)=> ("alength""alter-meta!")
Starting with version 0.3 this library is compatible with self-hostClojureScript. In order to try it out inlumo
, for instance, justdo:
lumo -c$(clojure -Sdeps'{:deps {cljs-tooling {:mvn/version "X.Y.Z"}}}' -Spath)
cljs.user=> (require '[cljs-tooling.complete:as ctc])nilcljs.user=> (ctc/completions @cljs.env/*compiler*"al" 'cljs.core)cljs.user=> (ctc/completions @cljs.env/*compiler*"al" 'cljs.core)=> ({:candidate"alength",:type:function,:ns cljs.core} {:candidate"alter-meta!",:type:function,:ns cljs.core})
Copyright © 2014-2018 Gary Trakhman & contributors
Distributed under the Eclipse Public License, the same as Clojure.
About
[DEPRECATED] Tooling support for ClojureScript