joyride 2023-11-20

I'd like to add the specs for the current namespace to the vscode "file/outline/etc" sidebar. Not just for quick browsing, but could also use spec.gen to put a sample in the clipboard, current files, etc. I could also see an option like "validate selection against spec". Getting specs by namespace isn't hard: (-> (clojure.spec.alpha/_registry_) _keys_ (->> (_filter_ _qualified-keyword?_) (_map_ _namespace_) _set_ )) Or some variation. There are more things to figure out, but I'm looking for feedback on the idea. On the implementation, I'm not clear on the current best practice of using joyride to add a tree to the sidebar. I thought there was a way to do it without sidecar, but maybe I'm mistaken. Any thoughts?

I think it was @max.r.rothman experimenting with outlines a bit? Shouldn’t need sidecar afaiu.

I gave up. It’s impossible to add new items to another extension’s outline (unless the extension provides an api do to so). Outlines are grouped by extension, if you add an item you’ll get a whole new group.

Yes, I tried to fight that too, but gave up. But if you’re ok with a separate outline group, it works, right?

Does that mean it would need to be at the same top level as outline/open editors/folders/timeline ? Or one level up, like explorer/search/source control/etc. ?

Oh, thank you! That gist saves me a ton of work. There seems to be some suggestions to use https://code.visualstudio.com/api/references/vscode-api#DocumentSymbol. these days. Not sure how relevant it is. Now I need to figure out how to add a context menu to an item, maybe.

That will involve a sidecar, but that’s fine of course.

iirc the sidecar example I created was a super simple tree view thing.

👍 1

And, dear Joyriders, I was a bit too eager to create the clojure-lsp support config there: https://github.com/BetterThanTomorrow/joyride/releases/tag/v0.0.37 • Fix: https://github.com/BetterThanTomorrow/joyride/issues/174

🎉 1

OK, dear Joyriders, I noticed I hadn’t thought the clojure-lsp configuration through enough, so here’s an update that helps a bit less with creating the config, and helps more via instructions instead. I’m sorry for being a bit too trigger happy with this. https://github.com/BetterThanTomorrow/joyride/tree/v0.0.38 • Fix: https://github.com/BetterThanTomorrow/joyride/issues/176`:joyride/user`https://github.com/BetterThanTomorrow/joyride/issues/176 I recommend to check the config created and follow the instructions. My Joyride scripting has lit up considerably since I got clojure-lsp to help me better.

🎉 1