oxalorg / 4ever-clojure

Pure cljs version of 4clojure, meant to run forever!
https://4clojure.oxal.org
225 stars 29 forks source link

Add a button for formatting code alongside "Run" and "Settings" #93

Open migraine-user opened 2 weeks ago

migraine-user commented 2 weeks ago

and perhaps a keyboard shortcut! When I am going through a problem, it's hard to iterate on the browser while formatting it so I can mentally parse it. It would be nice to have a way to format the code that I was writing so far. Maybe it would be possible to use cljfmt for this? I am still new to clojure, but I think I can try implementing this myself if that's alright.

borkdude commented 2 weeks ago

clojure-mode, which is the library used in this project also supports formatting.

You can see this at work in this playground, formatting happens when you hit tab:

https://squint-cljs.github.io/squint/

migraine-user commented 2 weeks ago

Oh, there wouldn't be a need for a new library. Is formatting available on the website as it is now, or would that still need to be added with clojure-mode?