If someone feels in the mood to help the Joyride project tremendously, you should consider adding documentation lookup to the #nbb nREPL server. There's an issue on nbb about it now https://github.com/babashka/nbb/issues/185, and it has a link to #babashka's implementation of this, which looks reasonably straightforward to port. ๐ โค๏ธ
Btw, clojure.repl/doc is available in joyride as well
I added a script example for glob-ing out files in the project and opening a random one: https://github.com/BetterThanTomorrow/joyride/tree/master/examples#opening-a-file
I was lurking here for a bit although I'm not using clojure much at the moment. This project looks very interesting and I was wondering if you are planning to let users add the custom commands to the command palette in addition to simple keybindings? I don't have a usecase (yet). Just curious ๐
I thought that already exists - Joyride: Run Workspace Script that opens up a new selection with all scripts
๐ I hope you will find Joyride intriguing enough to try it out some!
We really want to add that capability. The problem is that VS Code doesn't really allow it. Command palette content needs to be added as part of the extension manifest and is declared in JSON. There's a discussion (well, at least a starter) about it: https://github.com/BetterThanTomorrow/joyride/discussions/14
And, to add some hope, @mauricio.szabo is looking at it a bit. Not sure he has found much traction yet, but we'll see. If we can compromise some with the Ux, it might be doable.
Awesome, thanks for the reply! I left an upvote to the discussion. Really hoping to see this come to be in the future!
Hmm, perhaps Joyrideโs way of running commands could also wrap around vscodeโs own commands? So rather than using the default Cmd/Ctrl + shift + P, joyride could provide its own thing that lets you run all your joyride scripts + all of vscodeโs commands? Just as a sort of workaround for vscode not providing the feature itself
The neovim extension does something like that
Would putting the joyride-provided commands in a submenu (like where you select repl type after running jack in) get around the manifest issue? Suboptimal UX for sure, but something is better than nothing
That would need a side-car extension, which is being considered
The problem is that you can not add commands on the fly in an extension, you have to pre-define them. So the solution here would be to automatically generate an extension based on some logic.
Ah, so adding that needs quite a bit more setup than expected ๐ค I wonder if it would be possible to make that managable for the user. I believe that would come with quite a few necessary "tricks" to manage the sidecar extension.
Yes
Hey, everyone. How to prevent opening joyride bottom output panel when I run user/workspace script?
Not possible at the moment. I filed an issue about it. https://github.com/BetterThanTomorrow/joyride/issues/36 Thanks!
Ah, thanks
I left a question about init/activation script locations, on the PR where I am implementing them: https://github.com/BetterThanTomorrow/joyride/pull/35#issuecomment-1120401365 Please chip in. ๐
based on some experiments and reading some code, I'm reaching the conclusion that the 'classpath' (roughly speaking) is the workspace script directory - that is to say (require 'flib) works if flib.cljs is available in $workspaceRoot/.joyride/scripts, but not the user script directory - just curious if the user script directory is excluded on purpose, or just not included yet or whatever - I could imagine my user directory containing commonly-used functions that I would :require in workspace scripts (and other user scripts)
Does it work if you first load some namespace in your user scripts directory? I think it should.
It seems to only work if I run the user script that I'm requiring (which of course means the ns is already loaded). I ran userA.cljs from my user scripts dir, and then ran wsA.cljs from my ws dir, which requires userB. This results in the wsA run reporting that it can't find userB.cljs (in my workspace scripts dir).
Thanks. We probably need to look for sources in both locations, right @borkdude?
Would you like me to open an issue with the repro and so on so you can take a look at your convenience? I only asked here because I saw that :load-fn in the sci context appeared to only search the workspace directory, and I thought the user dir might have been considered and rejected already.
Issue welcome.
will do - tangentially, thank you for Joyride - really cool idea, and I'm sort of hoping to introduce it to some VSC users at work to expose them to some clojure in a context where many languages can't go
Awesome! Thatโs one of the goals with Joyride. To bring Clojure to the doorstep of developers who might find what Joyride offers to be intriguing enough to warrant using a new language.
Yes, it should search the user dir as well :)
Should it behave like this: A require in a user script, searches within the user dir and a require in a workspace script searches within the workspace dir? Or should it always search in both?
Good to hear you are enjoying joyride @highpressurecarsalesm :)
What I'm wondering about: what if your workspace scripts rely on user scripts? I guess your teammate also wants to use those workspace scripts but then they are incomplete right?
But maybe we should just let people decide how they want to deal with that and just allow it
It definitely opens up the ambiguity - in my mind, at the very least, a workspace script might want to re-use code made available by a user script - the other way around doesn't make as much sense to me, unless people wanted to make that a sort of hacky (IMO) polymorphism mechanism.
oh, I misread what you said - yeah, I guess it sort of goes both ways - I might have a bunch of workspaces where I want to re-use functions, but other people might want to use the same workspace scripts
Dear Joyriders: Activation scripts and extension context access now available if you upgrade your Joyride extension: https://github.com/BetterThanTomorrow/joyride/releases/tag/v0.0.7
What happened with v0.0.6? Well, let's say we really need to move the release process to CI...