This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-01
Channels
- # aleph (2)
- # announcements (3)
- # architecture (9)
- # babashka (56)
- # beginners (18)
- # calva (7)
- # catalyst (16)
- # cider (18)
- # cljfx (3)
- # cljs-dev (23)
- # clojure-europe (11)
- # clojure-hungary (1)
- # clojure-nl (2)
- # clojure-norway (24)
- # clojure-sweden (2)
- # clojurescript (37)
- # code-reviews (47)
- # datalog (3)
- # datomic (8)
- # emacs (11)
- # events (2)
- # graalvm (7)
- # gratitude (1)
- # hyperfiddle (12)
- # java (1)
- # jvm (46)
- # kaocha (3)
- # lsp (3)
- # malli (4)
- # matcher-combinators (1)
- # music (1)
- # nbb (1)
- # nrepl (4)
- # releases (1)
- # sci (15)
- # shadow-cljs (21)
- # slack-help (21)
- # tools-deps (17)
Is it possible to hide line numbers in calva REPL? line numbers are distracting me pretty much ;(
VS Code doesn’t have direct commands for it, iiuc. But you can use #joyride! If you don’t have Joyride installed these are the steps: 1. Install the Joyride extension 2. Focus the REPL window 3. Run the command Joyride: Run Clojure Code… 4. Paste this and hit ENTER
(set! (.-lineNumbers vscode/window.activeTextEditor.options)
({1 0 0 1} (.-lineNumbers vscode/window.activeTextEditor.options)))
From there you can make this into a keyboard shortcut, something like:
{
"key": "alt+r 0",
"command": "runCommands",
"args": {
"commands": [
"calva.showOutputWindow",
{
"command": "joyride.runCode",
"args": "(set! (.-lineNumbers vscode/window.activeTextEditor.options) ({1 0 0 1} (.-lineNumbers vscode/window.activeTextEditor.options)))"
},
"workbench.action.focusPreviousGroup"
]
}
}
You can also make it part of your Joyride user script and have it done more automatically.
@U0ETXRFEW Last question. I'm trying to build a hook that when I click a certain keybinding the Joyride will run the user/reset! function and pipe the output and result to the current CLJ repl. Do you maybe have an example of something similiar?
Hoping it is not the last question! 😃 I’m not sure I follow, but sounds like you will need to use Calva’s repl
API: https://calva.io/api/#repl The Clojuredocs example (inspired by @U04V70XH6’s VS Code setup) does this to resolve the current symbol in the repl. https://github.com/BetterThanTomorrow/joyride/blob/master/examples/.joyride/src/clojuredocs.cljs
Hey @U0ETXRFEW! It’s working like a charm! Thank you so much! Calva rocks!!!!!
VS Code doesn’t have direct commands for it, iiuc. But you can use #joyride! If you don’t have Joyride installed these are the steps: 1. Install the Joyride extension 2. Focus the REPL window 3. Run the command Joyride: Run Clojure Code… 4. Paste this and hit ENTER
(set! (.-lineNumbers vscode/window.activeTextEditor.options)
({1 0 0 1} (.-lineNumbers vscode/window.activeTextEditor.options)))
From there you can make this into a keyboard shortcut, something like:
{
"key": "alt+r 0",
"command": "runCommands",
"args": {
"commands": [
"calva.showOutputWindow",
{
"command": "joyride.runCode",
"args": "(set! (.-lineNumbers vscode/window.activeTextEditor.options) ({1 0 0 1} (.-lineNumbers vscode/window.activeTextEditor.options)))"
},
"workbench.action.focusPreviousGroup"
]
}
}