Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

[DEPRECATED] Tooling support for ClojureScript

NotificationsYou must be signed in to change notification settings

clojure-emacs/cljs-tooling

Repository files navigation

Continuous Integration statusDependencies StatusClojars Projectcljdoc badge

cljs-tooling

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.

Artifacts

With Leiningen:

 [cljs-tooling "0.3.1"]

Usage

Var info

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])}

Completion

;; env is pulled from cljs compiler statecljs-tooling.complete> (completions @cljs.env/*compiler*"al" 'cljs.core)=> ("alength""alter-meta!")

Self-host ClojureScript

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})

Contributors

License

Copyright © 2014-2018 Gary Trakhman & contributors

Distributed under the Eclipse Public License, the same as Clojure.

About

[DEPRECATED] Tooling support for ClojureScript

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp