How can I write async js functions with joyride?
Got it. I just invoked it at the top level
Another question, how to make joyride.runUserScript take argument? Currently, looks like it only accepts a single path argument.
Iirc it only takes the script path. To call something with arguments you need to use runCode.
right, but that's only available for cljs file
Ah, yes. You’d need to use some cljs file that requires the JS and has functions for calling in to it or something.
I’m not sure what running a script with arguments would mean. Happy to discuss it. Is there prior art in the Emacs world, maybe?
like, "runScript", "moveFiles.js {up|down}",
but I now created two files, moveFilesUp.js, moveFilesDown.js sparately, so problem solved.
Any particular reason you use JavaScript instead of ClojureScript?
I use half half. Now I tend to use js because of code completion.
Yeah, code completion. We should improve that.
You've already done a great job to improve the ecosystem.
There’s an extension for exploring the VS Code API from the nodejs prompt. I used that a while to give myself some poor mans code completion. But then CoPilot came and I tend to get pretty good help there.
Aha, right, copilot.
The nrepl server has completion though?
Yes, there is completion from nREPL, sometimes it beats the JS completion, sometimes it doesn’t. And since Calva is stupid about only allowing one REPL, it can get a bit inconvenient to use the Joyride repl.