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.
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).
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.
One of the answers on SO contains this:
{
"editor.renderWhitespace": "all",
"code-eol.newlineCharacter": "¬",
"code-eol.returnCharacter" : "¤",
"code-eol.crlfCharacter" : "¤¬",
}
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.
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!
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.
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.
Dear Joyriders, now you can test the new Getting Started Experience with latest Joyride: https://github.com/BetterThanTomorrow/joyride/releases/tag/v0.0.9: • https://github.com/BetterThanTomorrow/joyride/issues/52 • https://github.com/BetterThanTomorrow/joyride/issues/49 • https://github.com/BetterThanTomorrow/joyride/issues/46 • Fix: https://github.com/BetterThanTomorrow/joyride/issues/24 • Fix: https://github.com/BetterThanTomorrow/joyride/issues/40 • Fix: https://github.com/BetterThanTomorrow/joyride/issues/51
Thank you for the startup enhancements!
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?
What we really need is vscode API lookup. 😃 https://github.com/BetterThanTomorrow/joyride/discussions/22
That would be AWESOME SAUCE! 🎉
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.
Experimentation led me to that conclusion 🙂 So obvious!
REPL experimentation?
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 😆
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.