λiquid is absolutely not for everyone! It is for you if
There is no made up language or syntax to extend λiquid.
For discussions, help, tips and support, use
#liquid channel in Clojure Slack
clojure -Sdeps '{:deps {mogenslund/liquid {:mvn/version "2.0.9"}}}' -m liq.core
Or download jar liq.jar and execute
java -jar liq.jar
If the cursor seems to disappear when moving fast, try executing this code when loading liquid (e.g in the .liq file):
(swap! liq.tty-output/settings assoc :liq.tty-output/cursor-draw-hack true)
(It is not enabled by default, because it then sometimes cause other display issues.)
A place to start is Liquid Starter Kit
It sort of corresponds to a sample .emacs
file. Some code you can extend to create your own version of the editor.
The editor is written in pure Clojure. That is, there are no other dependencies, not even curses or lanterna!
I have been using Emacs for many years. I have tweaked it a lot and implemented modes, to simulate the Vim way of switching between insert mode and normal mode for navigation. I like being able to use the whole keyboard for navigation. As you will see in the video below, I am very inspired by Emacs and Vim, but I have chosen not to try to copy or re-implement Emacs or Vim. I have only stolen the features that I need or like. I hope others will just create plugins or extensions to make the editor support other features that they like.
Tight integration with Clojure code. It should be easy to have the same code executed from within the editor as well as outside. Using a real language for extensions provides a great advantage compared to a "home made" extension language, that only fits the specific editor.
Example: As a QA Engineer I do test automation using Selenium WebDriver. I have included the Selenium jar into my local environment, so now I can execute tests, parts of tests or snippets from within λiquid.
All other tools that I create in Clojure, which are useful as is, are easy to make accessible from within the editor as well.
Embedding the editor into your your application. Include the λiquid to your project and use it as part of your program or for debugging and patching, just like you already do with the REPL, but with some advantages: It is easier to open a file with code and execute parts of it, or jump between snippets, do modifications, and execute again.
Example: I have a file with snippets like: (patch "myserver")
, (status "myserver")
and (run-test "name-of-test")
. I just modify "myserver", if needed, and press "c p p" to execute the command.
Right now the only dependency is Clojure itself. I would like to keep it that way, as for core functionality. When starting λiquid, any resources can just be added to the classpath, and the code will be available from inside λiquid. So it is not a limitation to λiquid, it just means that anything requiring other dependencies should be implemented as plugins and be loaded together with λiquid. Extensions can be loaded through a .liq file in the home folder.
From Emacs I have been inspired by extensibility. Clojure is also the language for writing extensions. That was in fact a primary motivation for creating the editor. Actually it is possible to include the editor into a project and make the editor part of the program. This thought is very similar to the REPL (read-eval-print-loop), but more like an edit-eval-render-loop.
S-expressions in clojure can be evaluated with "c p p", while the whole file is evaluated with "c p f".
Copyright © 2020 Mogens Brødsgaard Lund
Distributed under the Eclipse Public License either version 1.0 or any later version.
Can you improve this documentation? These fine people already did:
Mogens Brødsgaard Lund, Mogens Lund, harryvederci, Victor Chan, Enzzo & JR HeardEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close