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

Implement JS completion mechanism #96

Closed
arichiardi opened this issue Sep 17, 2018 · 2 comments
Closed

Implement JS completion mechanism #96

arichiardi opened this issue Sep 17, 2018 · 2 comments

Comments

@arichiardi
Copy link

arichiardi commented Sep 17, 2018

Hi all!

I would like to slowly start tinkeiring with JS completions for CIDER. This is an initial issue for start thinking about it, possibly refactoring what is there maybe according to ideas in #73

My naive idea would be to intercept the complete op and somehow understand if a cljs REPL is attached, in which case evaluate some JavaScript using piggieback in order to get completions to the currently required JavaScript modules (lumo does it this way).

However, this could be the first real use case for the new op + metadata @thheller was talking about, where the client sends information in order to choose the environment to evaluate the expression in. Complete could have an additional :target and then a higher middleware layer decides how to move forward.

Just an idea, happy to discuss more and start hacking 😄

@bbatsov
Copy link
Contributor

bbatsov commented Sep 17, 2018

So, basically this ticket is about the adding the metadata or what?

I don't think it makes sense to add a complete op in piggieback, as cider-nrepl already does this and dispatches based on the repl type.

I was under the impression we don't have consensus when it comes to pausing/resuming cljs REPLs and directly teaching nREPL about different evaluation modes (clj and cljs).

@bhauman
Copy link
Collaborator

bhauman commented Sep 17, 2018

I agree that adding individual ops to piggieback doesn't make sense.

The one op that does make sense is the passthrough eval op of some kind.

Which would make it easier to add adhoc functionality to the ClojureScript REPL session.

@bbatsov bbatsov closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants