Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate clojure-lsp integration to cljs #1025

Closed
bpringe opened this issue Feb 9, 2021 · 5 comments
Closed

Translate clojure-lsp integration to cljs #1025

bpringe opened this issue Feb 9, 2021 · 5 comments
Labels

Comments

@bpringe
Copy link
Member

bpringe commented Feb 9, 2021

This is something I want to play around with to see what it's like to use cljs, not just for core functionality but also integration. The lsp related code is pretty sectioned off, not too large, and is my current area of work, so I think it's a good candidate.

@bpringe bpringe created this issue from a note in Brandon's Board (To do) Feb 9, 2021
@bpringe bpringe added the lsp label Feb 9, 2021
@bpringe bpringe moved this from To do to In progress in Brandon's Board Feb 9, 2021
@bpringe
Copy link
Member Author

bpringe commented Feb 11, 2021

This may just be my unfamiliarity with this area of shadow-cljs, but I haven't yet figured out how to use the typescript modules from cljs, like state and utilities, which I think is pretty important we're to use cljs more extensively and incrementally (no big rewrites).

thheller/shadow-cljs#841

@PEZ
Copy link
Collaborator

PEZ commented Feb 12, 2021

It might be that there is some minimum big rewrite we need to do. Both the modules you mention, utilities and state, are pretty horrible sinks for all kinds of functions...

I think we need to start with figuring out the dependency graph as it is today, and what it needs to look like to do some incremental porting TS->CLJS of the kind you are aiming for here, @bpringe .

Speculation: As the central functionality of the state module is provided by Immutable.js it might be somewhat in reach to move it down to the CLJS library and use an atom or something there instead.

@bpringe
Copy link
Member Author

bpringe commented Feb 12, 2021

As the central functionality of the state module is provided by Immutable.js it might be somewhat in reach to move it down to the CLJS library and use an atom or something there instead.

Exactly what I've been thinking! I agree about possibly rewriting some things and rearranging some deps. I do want to continue to try a bit more without doing that though. Thomas provided some great info here that might allow us to avoid a large-ish rewrite: thheller/shadow-cljs#841 (comment)

But yeah, it may be necessary to rewrite some things. I do love the idea of using an atom for state 😄.

@PEZ
Copy link
Collaborator

PEZ commented Feb 12, 2021

I made some experiments using citrus for state, back when we were planning on rewriting Calva in cljs completely. Might not be a good idea, but there is something with the subscription/dispatch model that lure me in. =) https://github.com/PEZ/calva-legacy/tree/citrus2/src/main

@bpringe bpringe changed the title Experiment with using cljs for clojure-lsp integration Translate clojure-lsp integration to cljs Feb 22, 2021
@bpringe bpringe closed this as completed Feb 24, 2021
Brandon's Board automation moved this from In progress to Done Feb 24, 2021
@bpringe
Copy link
Member Author

bpringe commented Feb 24, 2021

Released in 2.0.174. Must have forgotten to link this issue in a commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants