ProductPromotion
Logo

Clojure

made by https://0x3d.site

GitHub - dgrnbrg/redl: A better IDE integration story for Clojure
A better IDE integration story for Clojure. Contribute to dgrnbrg/redl development by creating an account on GitHub.
Visit Site

GitHub - dgrnbrg/redl: A better IDE integration story for Clojure

GitHub - dgrnbrg/redl: A better IDE integration story for Clojure

redl

Read-Eval-Debug-Loop

A better Clojure IDE integration experience!

Redl has been integrated into Vim, in dgrnbrg/vim-foreplay:omnicomplete

Usage

Note: the namespaces are subject to refactoring, and will become separate in the future.

Omnicompletion

completions finds fuzzy completions of a form in a given namespace. It treats ., $, and / as separators, and requires an equal number and order of separators to appear in the match target. The first character in each non-separator region must be the first character in the match; however, the other characters can appear in any order.

Completions matches Clojure namespaces and aliases, namespace and alias-qualified vars, unqualified vars, imported Java classes, methods of imported Java classes, qualified Java classes, and static methods and fields of qualified and imported Java classes.

Metadata is also computed about the completions. Clojure functions and vars include docstrings and arglists. Java classes include the type signatures of their constructors. Java methods include all available type signatures.

The matches are scored and sorted, where the score is computed by looking at how many characters that were not specified occurred between each character in the pattern, penalizing one large filler group over several small ones, and prefering that the pattern characters appear towards the front of the match.

Examples of matches:

  • clj./mp matches clojure.core/map
  • ./join matches clojure.string/join
  • M/cos matches Math/cos
  • .st matches .start, since Thread is included by default.

More examples can be found in the tests.

Debug Repl

make-repl creates a repl and returns its id. repl-eval evaluates a form on an existing repl, and returns the stdout, stderr, return value, and other metadata about the evaluation.

Redl is a debug repl, which means that at any point you can call break, in which case you'll drop into a sub-repl. This sub-repl has the same local scope as the break had, and can be used to inspect and explode in the middle of a function evaluation. When you're ready to return, invoke continue. You can have break return its optional invoke if you invoke continue with no arguments, or you can have break return something else by invoking continue with an argument. You can also use step-out to move to a higher repl level, to exit loops and nested loops quickly. See the tests for more examples, or below for a sample session.

redl.core=> (+ 1 2)
3
redl.core=> (+ 1 (break 3))
Encountered break, waiting for input...
redl.core:debug-1=> (continue 8)
9
redl.core=> (let [x 1 y 2] (* x y (break 3)))
Encountered break, waiting for input...
redl.core:debug-1=> (println x y)
1 2
nil
redl.core:debug-1=> (continue)
6

Including in a Leiningen project

Note: these will be easier when I get around to it.

You'll need to clone this repository, then run lein install to include it in your local maven cache. Next, you'll want to add the following keys to your .lein/profiles.clj:

  • :injections [(require '[redl core complete])] ensure that redl is loaded on jvm startup
  • :dependencies [[redl "0.2.0"]] ensures that redl is available on the classpath

License

Copyright © 2012 David Greenberg

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

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory