joyride

leifericf 2022-05-11T08:51:40.972849Z

Today, I needed to show line endings and other non-visible characters in VS Code. Turns out it was more involved than I thought. I stumbled upon https://stackoverflow.com/questions/39525417/visual-studio-code-how-to-show-line-endings, and https://github.com/Microsoft/vscode/issues/12223. It doesn’t seem to be possible? I’m currently at the office with limited time for a task, so I haven’t been able to dig further into this. But I thought maybe this could be a potential use case for Joyride to show/hide “invisible” characters in the editor itself.

pez 2022-05-11T09:01:13.548369Z

That looks like a super great thing to make an example of. And then post it as a workaround on that issue. I saw there was an extension that addressed it and the author specifically said: > I hope the extension gets obsolete I'll see if I can find some time to create the script(s).

leifericf 2022-05-11T09:02:41.756809Z

Yeah! It seemed like a good use case. Also, perhaps we could expose some options to allow the user to choose which characters to use to visualize the different kinds of whitespaces as well, with some sensible defaults in the script.

leifericf 2022-05-11T09:03:17.206399Z

One of the answers on SO contains this:

{
    "editor.renderWhitespace": "all",
    "code-eol.newlineCharacter": "¬",
    "code-eol.returnCharacter" : "¤",
    "code-eol.crlfCharacter"   : "¤¬",
}

pez 2022-05-11T09:07:07.992019Z

Joyride can't contribute configuration proper unfortunately. (At least not yet https://github.com/BetterThanTomorrow/joyride/discussions/14) But since it will be a script, the characters will be there for the users of the script to replace with whatever they fancy.

pez 2022-05-12T06:58:11.848299Z

Well, it took me much longer to create the Getting Started experience yesterday than I thought it would. (Mostly the coding went smooth, but an npm dependency challenged our build process...) Anyway, I'm keeping this near the top of my todo list. Sounds like a super fun task!

pez 2022-05-11T16:21:21.820939Z

Dear Joyride friends. Can I get some help test a new feature? It creates default content for the User scripts directory. Getting Started stuff. 1. Move away any ~/.config/joyride/scripts folder you might have. 2. Install from VSIX: https://output.circle-artifacts.com/output/job/d0204249-1e3a-483a-8166-df390c785255/artifacts/0/tmp/artifacts/joyride-0.0.9-52-get-started-content-68241df5.vsix. 3. Reload the VS Code window What you should see happen is that the Joyride output channel says hello from a getting started activate.cljs. And Run User Script should list two scripts. Please let me know what you think.

pez 2022-05-11T16:24:36.814549Z

There's a https://github.com/BetterThanTomorrow/calva/issues/1721 stopping it from being smooth to start a REPL with a user script open. I will fix that one. For now, open some file in your workspace before starting the Joyride REPL and connect.

seancorfield 2022-05-11T20:49:33.119159Z

Thank you for the startup enhancements!

❤️ 1
seancorfield 2022-05-11T20:55:52.831179Z

I thought I could just change (.show true) to (.show false) but that did not work so maybe the comment on that line could be clearer about what needs to be done @pez?

pez 2022-05-11T20:58:08.509599Z

What we really need is vscode API lookup. 😃 https://github.com/BetterThanTomorrow/joyride/discussions/22

seancorfield 2022-05-11T20:59:05.126179Z

That would be AWESOME SAUCE! 🎉

pez 2022-05-11T21:00:17.433599Z

That second parameter to show() is not intuitive. In case you (or anyone) haven't figured it out: passing false will still show the channel, and steal focus. true keeps the focus.

seancorfield 2022-05-11T21:02:25.559279Z

Experimentation led me to that conclusion 🙂 So obvious!

pez 2022-05-11T21:02:41.706139Z

REPL experimentation?

seancorfield 2022-05-11T21:03:21.026879Z

I set it to false and reloaded the window to see if that made it go away. And it not only still appeared but also stole focus 😆

😂 1
pez 2022-05-11T21:10:27.696089Z

I'm releasing a new Calva in a few minutes. Fixing a bug that stops it from being easy to start a REPL on the user scripts.