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

js namespace is not available for auto-completion on (cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env)). #1498

Closed
crocket opened this issue Dec 31, 2015 · 6 comments
Assignees

Comments

@crocket
Copy link

crocket commented Dec 31, 2015

Steps to reproduce:

  • Create a leiningen project
  • Add clojurescript and cemerick.piggieback as dependencies
  • Launch a cider clojure REPL
  • Execute (cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env)) to launch a nodejs REPL.
  • Type js/ and press TAB

Expected Result:

Auto-completion should show me a list of variables in js namespace.

Actual Result:

I see nothing.

@bbatsov
Copy link
Member

bbatsov commented Jan 6, 2016

@cichli Can you take a look at this, please?

@cichli cichli self-assigned this Jan 6, 2016
@cichli
Copy link
Member

cichli commented Jan 6, 2016

I've looked at this before, with an enhancement to the CLJS compiler we could at least provide completion of externs - http://dev.clojure.org/jira/browse/CLJS-1047.

General completion of everything in the JS runtime requires eval which might block the REPL, or block if there's an eval op already running. The completions would also only be known to be valid at REPL-time, whereas in general the CLJS autocompletion only tries to suggest things that will actually work in your compiled CLJS. For example, you might define some variable on window in the JS environment you're connected to with your REPL, but then that variable won't necessarily be defined when your ClojureScript program is running in another environment.

@TatriX
Copy link

TatriX commented Nov 11, 2016

Is it possible to complete built-in functions and objects? Like js/document.querySelector etc.

@stale
Copy link

stale bot commented May 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale label May 8, 2019
@bbatsov
Copy link
Member

bbatsov commented May 14, 2019

@arichiardi Is this something you can help with?

@stale stale bot removed the stale label May 14, 2019
@bbatsov
Copy link
Member

bbatsov commented Sep 22, 2019

This is finally fixed in CIDER 0.22. All the credit goes to @rksm and his wonderful clj-suitable project, which CIDER leverages to provide better completions.

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

No branches or pull requests

4 participants