calcit-editor icon indicating copy to clipboard operation
calcit-editor copied to clipboard

I want to use my project with calcit-editor

Open p4ulcristian opened this issue 1 year ago • 4 comments

Hello, I have some questions, and I didn't know where to ask.

I always wanted an editor which is not based on a text editor. I want to import my already existing Clojurescript project, is this doable?

p4ulcristian avatar Oct 30 '23 20:10 p4ulcristian

Sorry, bad news is I migrated to Calcit and newer versions of calcit editor is no longer targeting ClojureScript.

Since this project is open-sourced, you may still use the project. There are several difficulties if you want to import existed Clojure code:

  • this editor does not support macros or some syntax(find more at https://github.com/Cirru/sepal.clj)

  • you have to convert Clojure to Cirru EDN by yourself now, snapshot file of this editor is like https://github.com/mvc-works/calcit-workflow/blob/master/calcit.cirru , which you can generate with https://github.com/Cirru/cirru-edn if you have a solution for turning Clojure code into data(syntax tree probably). also check https://github.com/Cirru/calcit-editor/blob/78f707830957d45794332f4b566f3e061596329b/src/app/util.cljs#L30-L44

thanks for being interested in Cirru. you can leave comment here or send me tweet if you need more information related to Cirru and Calcit.

tiye avatar Oct 31 '23 10:10 tiye

No problem, at least now I know that this is possible. I'll try to write my own version with rewrite-clj hopefully. In the latest calc-editor do you have the ability to move a function to another namespace? My vision is really close to yours, thank you for your work :)

Anyway, I hope this editor will be very popular, it feels like future.

(sending a tweet is 15 eur/month unfortunately)

p4ulcristian avatar Oct 31 '23 17:10 p4ulcristian

to move a function, you will need "Rename" button at the bottom toolbar:

Calcit Editor(Latest)

change the path to a new namespace(if existed), then the function is moved.

Calcit Editor(Latest)

it's also useful when you want to just rename current function.

tiye avatar Oct 31 '23 18:10 tiye

Thank you for the inspiration!

https://github.com/Cirru/calcit-editor/assets/15257711/6eb292a3-69d3-4995-8e5f-973fd85a1126

p4ulcristian avatar Dec 01 '23 02:12 p4ulcristian