Fork me on GitHub
Vincent Cantin04:02:39

Question: Is there any Clojure(Script) implementation of something close to what CodeMirror does?


That's not really CM -- which is in-browser -- but Liquid is very cool (as a vi-like editor).


I believe liquid also runs in the browser


Oh, that must be new.


I don't see any indication of that in the README? Liquid was purely Clojure/JVM last I looked.


maybe I'm crazy

Vincent Cantin05:02:18

I see some CLJC files, but not clear direction on how to use it in a browser.


I thought I remembered seeing a cljs example somewhere

Vincent Cantin05:02:15

I think that Liquid is only for Clojure source code, it does not support other languages.


i've used CM from cljs. there's an example of it as well from

👍 3
Vincent Cantin05:02:36

I will try to reuse this code snippet. Thank you.

Vincent Cantin05:02:04

I found a Clojure mode for CM v6, will give it a try instead.


Yeah I’ve been meaning to take a look at that new one


not sure if that addresses your question or not. but if you're finding something amenable for use from cljs it works

Vincent Cantin05:02:48

I used CM 3 years ago to make a TIS-100 editor and I did not like its JS API. Now I am fully used to Clojure, I don’t want to go back to CM, hence my question.


fwiw, liquid does run in the browser


I think this is the code


Liquid is very hackable and supports extension. So while it doesn't have other language modes, it would be possible to extend it.


Ah, the in-browser version is new-since-I-last-looked-at-it 🙂


I think Liquid is a fascinating project!


I've been using Liquid for my UI projects. If you don't mind including a JS implementation (like Rhino) it's possible to reuse codemirror modes for syntax highlighting. The deeper integrations from codemirror modes are less reusable.


Hi. Just to clearify. The new liquid does not run in the browser. The old did. It is not difficult to implement again as a server. It sort of boils down to sending keypresses from the browser to the server, receiving a list of changed characters in the view back. I also, at some point build a version (also old), that could run directly in the browser. It does not have "eval" and it does no perform well, so it should be regarded as an experiment and not a solution for anything. I think real multi-threading is what makes it perform on the JVM. You can handle drawing without blocking input 🙂


Hi all, I remember seeing at some point a link to a shared calendar that contains all Clojure community events. Unfortunately I lost it and can’t find it anymore. Does anyone have the link lying around? Thanks!


Yes it was, thank you!! 🙏


@U04V6FEES Did it maybe stop working? I don’t get any events after last weekend…


@UGNFXV1FA it’s a crowd-sourced calendar 🙂 I just added a couple of new events from the London Clojure meetup

❤️ 3

@vincent.cantin Just curious, is CM not suitable for you? FWIW the author is writing pretty sensible APIs and has worked on these problems for quite a long time.

Vincent Cantin21:02:41

From memory (I used it 3 years ago), I had the feeling that the error reporting and auto completion could be done in a more automated way, for example based on a grammar. Maybe that's what is coming in CM v6

Vincent Cantin22:02:55

From a practical point of view, it still does what I need to do, no problem.


Have you seen this ? Not sure if you want to edit Clojure

Vincent Cantin10:02:11

I saw it and will use it. The code editor will be a hiccup-based css playground.


I can't help referring to a line in Imagine song adaptation in my project's homepage 😂

pathom 9