Questions tagged [vscode-calva]

For questions about Calva, a Visual Studio Code extension for working with Clojure and ClojureScript.

Calva is a Visual Studio Code extension aiming to provide an enjoyable and productive environment for working with Clojure and ClojureScript.

17 questions
12
votes
1 answer

How to avoid unresolved symbol with clj-kond when using hugSQL def-db-fns macro?

I write Clojure using the VS Code Calva extension, which uses clj-kondo to perform static analysis of my code. I'm using HugSQL to create Clojure functions from SQL queries and statements. I'm aware that I could handle the database connection and…
jackdbd
  • 4,583
  • 3
  • 26
  • 36
7
votes
2 answers

How to connect a ClojureScript node REPL to my :node-library shadow-cljs project?

Context I am building a Node.js library with ClojureScript and shadow-cljs. All development is done with ClojureScript but the build artefact is a NPM package. Example: (ns com.example.answer) (defn answer [] 42) build... release... then const…
customcommander
  • 17,580
  • 5
  • 58
  • 84
2
votes
1 answer

How to auto-format clojure "on save" in VSCode

I'm currently using VSCode, and I'm trying to auto-format clojure files. I have Calva installed. I've typed the following code into my .clj file: (let [a :b] (str "foo" "bar" "baz" "a" a)) I'm expecting it to auto format when I save, but…
bugsyb
  • 5,662
  • 7
  • 31
  • 47
2
votes
1 answer

Calva Error "LSP classpath lookup failed when running `lein with-profile +test,+dev classpath`. "

I would like to use vs code as development environment for clojure. I'm opening guestbook project in vs code. As soon as the project is opened in vs code I get error pop up. LSP classpath lookup failed when running `lein with-profile +test,+dev…
user51
  • 8,843
  • 21
  • 79
  • 158
2
votes
0 answers

How to set a breakpoint in a Clojure program using Calva?

I am working with a Clojure code and need to make changes in some parts of it. For that, I need to stop it in a breakpoint to see what are the values of atoms, variables, .... one step before new changes. The code I am working with…
ZGI
  • 45
  • 5
2
votes
0 answers

Why do I get syntax error for index-of method in clojure

I just started trying out clojure. I am doing my best to start vibing with the lisp syntax style. I am using vs-code on a mac, project is created with leiningen, calva is working (jack-in). Every time I try to import a library, for example (ns…
Carlos
  • 43
  • 7
2
votes
2 answers

Clojure: capture runtime value of function arg, to use in REPL

Problem My web front-end calls back-end queries with complex arguments. During development, to avoid time-consuming manual replication of those arguments, I want to capture their values in Vars, which can be used in REPL. Research This article shows…
1
vote
2 answers

How to open multiple projects in VS Code with only one LSP connection?

I have multiple projects (git-repos). I have opened these in one multi-root workspace using Add Folder to Workspace.... Since these are all Clojure projects, and I have Calva installed, VSCode identified the correct LSP server clojure-lsp. But VS…
Witek
  • 6,160
  • 7
  • 43
  • 63
1
vote
0 answers

Sharing common helper scripts among projects in VSCode

I have a few utility functions, snippets and scratches that I want to be able to use in every project. Currently I have the following setup for Clojure projects and Intellij IDEA/Cursive: I have a user profile defined in .lein, where I have…
Alex K
  • 45
  • 4
1
vote
1 answer

Clojure in VSCode, Calva messes with compile path?

So I setup a project with Lein, test and run, works fine. I open it in VSCode (where Calva is installed) and when running the same test: lein run test I get C:\Users\felix\AppData\Local\Temp\clojure-3239065182638120769.edn So there is something when…
Tarmiac
  • 846
  • 1
  • 8
  • 14
1
vote
2 answers

calva - how to stop the repl?

I'm using vs code with calva on Ubuntu. My clojure app listens on a port and I find that if I exit vs code, it leaves a java process bound to that port which I have to locate and kill before I can start again. Is there any calva command to stop the…
Andy
  • 10,412
  • 13
  • 70
  • 95
1
vote
1 answer

Problem while using Calva / Reveal together

I was using Vscode + Calva for developing Clojure. And I watch this and try to use Reveal with Calva. I see this and add cider.nrepl/cider-middleware to middleware. (I'm using this deps.edn and just add cider/cider-nrepl {:mvn/version "0.26.0"} and…
yujonglee
  • 55
  • 1
  • 6
1
vote
1 answer

How to point calva/clj-kondo to find the config file in a subrepo, not at root? F ex: /frontend/.clj-kondo/.config

I'm using a monorepo structure so I don't want it in root, like the documentation wants. So how can I tell calva / clj-kondo where to find this config file? https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md
Sindre
  • 57
  • 1
  • 9
0
votes
1 answer

How do I add a new file to a Clojure project with Leinigen or Calva?

So I create a project with Lein: lein new app test I open it in VSCode code test I run Calva. I then test some simple functions in test.core. Works fine. Now I wanna have a new file with it's own namespace. I create the file meat.clj inside: (ns…
Tarmiac
  • 846
  • 1
  • 8
  • 14
0
votes
2 answers

Calva fails to lanch betterthantomorrow.calva-2.0.214\clojure-lsp.exe_backup.exe

Since today Calva fails with [Error - 12:47:40] Starting client failed Launching server using command c:\Users\ros1sgm\.vscode\extensions\betterthantomorrow.calva-2.0.214\clojure-lsp.exe_backup.exe failed. I have updated to Visual Studio Code…
Rosswart
  • 51
  • 7
1
2