Fork me on GitHub
#calva
<
2021-12-04
>
orestis18:12:16

@seancorfield I was perusing your configuration and I was wondering if you use Calva for the static parts and clover for REPL connections?

seancorfield19:12:43

Correct. I rely on builtin VS Code stuff where it works, Calva/LSP for additional static stuff, and Clover for the REPL and dynamic stuff (socket REPL).

seancorfield19:12:02

We have socket REPLs in many of our processes, not just for local development. No nREPL anywhere.

orestis19:12:09

I was using Conjure (for vim) before which uses nrepl but I don't think it leverages much functionality there. Especially with LSP a lot of the useful stuff (go to definition, documentation etc) is provided anyway.

orestis19:12:07

Im not sure about CLJS though. Does clover have support for that over shadow-cljs? Perhaps it's not the right place to ask but thanks for confirming, it's nice to know that the two plugins play well with each other.

seancorfield19:12:56

I don't do cljs. I did spend some time looking at tooling again, maybe a year ago, and used Figwheel Main with a Socket REPL, so I was mostly writing cljc files and eval'ing/testing those via Clover, and relying on hot reloading to test it as cljs in the browser....

seancorfield19:12:33

That was a much nicer combo than the last time I worked with cljs back in 2013/2014 🙂

orestis18:12:48

I have an experience report! With the new and improved vs code bracket colorizer, after I've turned off Calvas way of matching brackets etc, one of the major deal breakers for me is removed: the editor has stopped flickering while typing! Now that I know I can also customize the matching brackets highlighting, it's a blessing.

đź‘Ť 1
Humanist196518:12:54

My Calva “Go to Definition” has stopped working when I connect to a remote REPL that I am running under docker. It works when REPL is disconnected or when I run a jack-in REPL. I am now getting errors like: Unable to open 'json_helper.clj': Unable to read file '/app/src/http/api/json_helper.clj' (Error: Unable to resolve nonexistent file '/app/src/http/api/json_helper.clj').

bringe20:12:14

Do you know if cider-nrepl middleware is loaded in the repl running in docker that you’re connecting to?

bringe20:12:28

If jack-in works, I suspect your other repl is missing some dependency.

bringe20:12:12

There’s a command to copy the jack-in command to your clipboard, and you can paste it somewhere to see what dependencies you might be missing, or just run jack-in and look at the command in the terminal.

Max21:12:00

Oh I know this one! It’s because when you're jacked in, calva uses cider instead of lsp for those features. cider gets confused because the path to the file in your container is different from the path on your system

Lukas Domagala21:12:39

is there a reason that it switches from lsp to cider? is it more accurate or is that just “left over” from a time before a good LSP version? mhh now that I think about it, cider would give you the information on the stuff you already eval’d and if you are still working in the file only lsp would have better info, so that should get priority? otherwise cider could send you somewhere that doesn’t exist anymore in the files?

Max23:12:17

Dunno, I sure wouldn’t mind an option to turn off cider’s version

bringe02:12:12

I think the reason there’s this hybrid approach is that sometimes cider-nrepl gives better info than LSP, but I think also @U0ETXRFEW wants Calva to use repl tooling as much as possible when a repl is connected, maybe in case for some reason clojure-lsp doesn’t run for someone. However, I think most people don’t have a problem running clojure-lsp these days. There is the option of adding a setting to always use clojure-lsp for features that currently use one or the other depending on different factors. I don’t know how @U0ETXRFEW would feel about adding a setting like that, though. Settings do increase complexity in code and in troubleshooting.

Humanist196508:12:13

Weird thing is it used to work until my Calva version got upgraded :thinking_face:

pez08:12:16

Can you try with an older version and see if that works? Remember that if clojure-lsp is set to latest you will be running with latest there regardless of Calva version.

wilkerlucio14:03:19

I maybe have hit something related, in my case the jack-in is connecting to a REPL running on a Docker env, and them all navigations fail... is there way to disable navigation via cider and keep only the LSP one active?

pez14:03:50

Not currently. Please file an issue about it.

lspector23:12:01

Is auto-reformatting of incomplete and imbalanced expressions anywhere on the near-term development agenda for Calva?

pez08:12:04

Not really. You can file a feature request to make it visible, and maybe someone who sees it knows how to do it and choose to spend the time.

đź‘Ť 1
lspector20:12:28

Added a github issue, which I presume is what you meant (let me know if not).

pez07:12:30

Yes, thanks!