Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code clerk/show! #393

Closed
wants to merge 1 commit into from
Closed

Conversation

brettrowberry
Copy link

Add VS Code clerk/show! file watcher hotkey instructions.

Add VS Code clerk/show! file watcher hotkey instructions.
@brettrowberry
Copy link
Author

Thanks @mike706574 for helping me figure this out!

@brettrowberry
Copy link
Author

Hmm, looks like this info is also in https://github.com/nextjournal/clerk#editor-workflow so I'd need to update that too.

@mk
Copy link
Member

mk commented Feb 2, 2023

Hey @brettrowberry,

Thanks a for looking into this, been wanting to have this for a while. Do you think setting up a global shortcut for nextjournal.clerk/show! would also be reasonable? I use alt+enter in Emacs. I'm on the fence if we should include a shortcut for nextjournal.clerk/serve!, maybe leave that as an exercise for the reader?

@blnote
Copy link

blnote commented Feb 22, 2023

the show! shortcut from updated book.clj does not work for me in windows, because $file contains escaped characters "C:\U...." that can not be read by the REPL
easiest fix would probably be on Calva's side by escaping the path
btw thx for your amazing work!

@PEZ
Copy link

PEZ commented May 8, 2023

$file contains escaped characters "C:\U...." that can not be read by the REPL

Ouch! That needs to be fixed in Calva. Please file an issue there!

@mk
Copy link
Member

mk commented May 8, 2023

Thanks for looking into this @PEZ, I've filed BetterThanTomorrow/calva#2184.

@PEZ
Copy link

PEZ commented May 8, 2023

Thanks for the issue, @mk!

@blnote : Here's a build of Calva that should be escaping the file path backslashes. I don't have a Windows machine handy, can you give it a spin?

To install it you need to download the VSIX package to your machine (and rename it the extension to .vsix if it downloads as a .zip), then from the Extension pane in VS Code, select Install from VSIX... in the meatballs menu at the top of the pane.

@PEZ
Copy link

PEZ commented May 9, 2023

This fix is now released, blindly, in Calva v2.0.358. All that is changed is that all \ in $file will be replaced with \\. So, it really should fix the issue...

Another thing. I'd like to mention a new feature in Calva, released with v2.0.356, that might, or might not, be relevant for Clerk notebooks workflow. It's a way to get code called when the file is loaded in the REPL (using Calva's command for Load File). The same substitutions as with the custom command snippets are available here. See: Calva: Auto-evaluate Code at file/namespace load/evaluation for details.

@blnote
Copy link

blnote commented May 9, 2023 via email

@brettrowberry
Copy link
Author

brettrowberry commented Jun 21, 2023

I haven't used Clerk for a long time. Feel free to close or do whatever. Thanks!

@brettrowberry brettrowberry closed this by deleting the head repository Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants