This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-07
Channels
- # announcements (2)
- # babashka (34)
- # beginners (114)
- # biff (7)
- # calva (16)
- # cider (2)
- # clj-kondo (46)
- # clj-on-windows (14)
- # clojars (13)
- # clojure (33)
- # clojure-europe (17)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (25)
- # community-development (1)
- # datalevin (1)
- # emacs (53)
- # fulcro (31)
- # gratitude (2)
- # jobs (1)
- # lambdaisland (12)
- # lsp (57)
- # malli (3)
- # nbb (1)
- # off-topic (92)
- # pathom (2)
- # pedestal (2)
- # releases (5)
- # shadow-cljs (25)
- # sql (3)
- # squint (1)
- # testing (6)
- # vim (11)
I use the local history extension for VS code, which create a .history
folder with old versions of files. How can I make sure those don't get picked up by Calva as valid source files? When I Go To Definition
I sometimes jump to those files and start editing them...
I added an entry to ~/.config/clojure-lsp
which I think is working, because first, without ever having run a Repl in a project, .history
files do not appear when I Peek References
. But when a Repl is started I sometimes land in these .history
files, which I shouldn't. And once that happened the relevant .history
file gets picked up even without a running Repl.
Where is this .history
folder created? By default Calva prioritizes dynamic (REPL) definition lookup. I don't see how that could start finding files in the .history
folder unless those has once been loaded/evaluated. That the static lookup finds them once they have been opened sounds like clojure-lsp will start indexing it when it is opened. You could run with static lookup being prioritized to see if that helps. There's a setting for it, I don't recall the name right now, but the settings search is pretty powerful.
.history
is created inside the root directory, but I have a setup where root dir of the project is in the subfolder and it is a lein project.
Will try giving Clojure LSP precedence, I remember you mentioning it here short time ago, will update it here when I find out more. Thanks for the reply! 🙂
I decided to evaluate Calva. One Calva newbie question. https://calva.io/connect/ > Consider using Jack in to inform yourself on how to start your REPL to Calva's satisfaction. With Emacs/Cider and IntelliJ/Cursive I have always started the REPL in the command line and then connected the editor to this REPL. Is there something I lose as a developer experience with VSCode/Calva if I use the same practice with Calva, i.e. connecting without Jack-in?
Yes, I understand that you can connect to a running REPL using Calva. But I'm interested if Calva benefits somehow that the REPL is started using Jack in?
No, you don’t lose anything. The reason for the recommendation is more involved to describe the steps, and that beginners often start the REPL w/o the necessary dependencies. As long as you get the dependencies right, it is equivalent/the same.
In Calva, is there a REPL editor and REPL output window like in Cursive? I mean, when I evaluate a form in the IntelliJ editor, Cursive echoes the evaluation to a REPL output window. In VSCode with Calva, I can see the evaluation in the code editor, but it would be nice to have the evaluation history in the REPL output window as in Cursive.
Yes, this window should open as part of the REPL connect procedure. It is a regular file, with some special treatment, created in .calva/output-window/
. I wonder why it is not opening for you, but there is a command for opening it: Calva: Show Output/REPL Window.
There is a setting for automatically showing the output window on jack-in and connect. Check if you have somehow disabled that. It is enabled by default.
Thanks!
The command Calva Paredit: Kill/Delete Sexp Forward
does delete the sexp forward from the cursor, but it does not add the sexp to the clipboard (like Emacs "kill") to be pasted in some other place in the editor (like Emacs "yank"). Or am I missing something here?
That's correct. There is a setting Calva Paredit Kill Also Cuts to Clipboard that you can enable to get that behaviour for all Paredit kill commands. There is not kill ring though, so it isn't as powerful as with Emacs.
Thanks!