Question: Is there any Clojure(Script) implementation of something close to what CodeMirror does?
@vincent.cantin, check out https://github.com/mogenslund/liquid
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
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
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 https://github.com/borkdude/re-find.web/blob/master/src/re_find/web.cljs#L371
not sure if that addresses your question or not. but if you're finding something amenable for use from cljs it works
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 http://salza.dk/liq/
I will try to reuse this code snippet. Thank you.
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 think this is the code
I agree!
I found a Clojure mode for CM v6, will give it a try instead. https://nextjournal.github.io/clojure-mode/
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 🙂
Yeah I’ve been meaning to take a look at that new one
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!
@stefan.van.den.oord was it this announcement? https://clojureverse.org/t/clojure-events-calendar-feed/6781
Yes it was, thank you!! 🙏
@eval2020 Did it maybe stop working? I don’t get any events after last weekend…
@stefan.van.den.oord it’s a crowd-sourced calendar 🙂 I just added a couple of new events from the London Clojure meetup
@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.
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 https://walkable.gitlab.io 😂
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
From a practical point of view, it still does what I need to do, no problem.