Skip to content

jfacorro/clojure-lab

Repository files navigation

Clojure Lab

Clojure Lab is a project that aims to build a development environment for Clojure in Clojure, its main goals are usability and extensibility. This project is currently under development, so most of the assertions that follow are closer to wishful thinking than reality... for now :).

Usability

  • When new to the environment you should feel comfortable while discovering and interacting with the features available.
  • There should be no road blocks and work should flow naturally once you are familiarized with the way things work.
  • Enable the best possible use of the keyboard and mouse combination, both are useful tools for interaction and they each should have their place while working in the environment.

Extensibility

  • Provide a simple API to create your own tools and controls that can be used in the environment, for example in case there's a tool that you are missing and you feel like scratching your own itch.
  • New types of projects and documents can be created with plugins.
  • Plugins will have access to every core library, so that existing functionality can be enhanced and built upon.

Rationale

When I started using Clojure I bumped into the situation where I didn't quite know what to use for Clojure development. Emacs seemed too big a challenge to start playing with a new language, so while reading the Joy of Clojure and going through its examples, Clooj was a pretty good tool to explore the basics. Although Clooj has its shortcomings it provides a friendly, simple and familiar interface.

After some time of Clojure development three things happened that brought Clojure Lab into being:

Even when I discovered Counterclockwise and Light Table was annouced , I still decided to try and build an IDE that could cover as many of the features mentioned in The Ideal Clojure Development Environment as possible. The final goal is to have a powerful extensible tool, yet simple and accessible, that provides a reactive user interface with discoverable features (a lot easier said than done, right?).

Running the Application

Requirements

In order to fire up Clojure Lab from the REPL, build or run it you need:

REPL

The application can be run by either using the lein run or starting a REPL and then calling the -main function:

$ lein repl
lab.main> (-main)

Building

An executable lab.jar file can be generated through the use of the lein build command.

Downloading

Pre-built executable jar files are available in the releases section of this project.

User Guide

There's a small user manual/guide that shows how to start using Clojure Lab here.

Features

Most of the features in the following list were extracted from the post The Ideal Clojure Development Environment:

Code Editing

  • Syntax highlighting. DONE
  • Brace, bracket, paren matching. DONE
  • Paredit equivalency. DONE
  • Easily-togglable rainbow parens. DONE
  • S-expression navigation.
  • In-place popup macroexpansion. DONE
  • Auto completion. DONE

Project Organization

  • File management. DONE
  • Code compilation.
  • Dependencies resolution (maven & leiningen support).
  • Initial configuration. DONE
  • Static analysis:
    • Current file code outline. DONE
    • Static namespace browser.

REPL

  • Multiple REPLs support (each running on a separate process). DONE
  • Execution history:
    • Search.
    • Execute again. DONE
  • Runtime namespace browser.
  • Full editor capability in the REPL.
  • Automatic generation and configuration of the classpath for local REPLs. DONE (Leiningen)

Nice-to-have

  • Full Java support Integrated (debugging, code completion, profiling, etc.).
  • Code generation (deftype/defrecord/extend-type/gen-class/proxy).
  • REPL
    • Configurable pretty-printing of output.
    • Being able to print non-textual data, like images and such.
  • Static analysis
    • Symbol navigation (i.e. "Go to declaration").
    • Find usages.

License

Copyright © 2014 Juan Facorro

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

About

Clojure Lab - Development Environment in Clojure

Resources

Stars

Watchers

Forks

Packages

No packages published