Fork me on GitHub
#calva
<
2021-02-09
>
jonoflayham18:02:48

Thanks! Here because I’m considering leaving IntelliJ…

lread18:02:39

I am enjoying my time with Calva and am astonished by the pace of the Calva team. I think you are at least 8 borks on the borkdude productivity meter!

😂 3
😁 1
pez18:02:57

Haha, I think we might be an 8th bork, but that is pretty impressive! 😃

pez18:02:30

Super happy for your kind words, @lee. Thanks! ❤️

lread18:02:04

Hey, personally I rate 0.1 productivity borks on a good day. simple_smile I’m happy with it, but am always impressed when I see productive teams!

seancorfield18:02:35

VS Code already updated Calva and I just tried out that new dragging feature: very nice! I don't know if I'll ever be able to remember the key chord for it, mind you 🙂 (but I have the command palette)

pez18:02:44

Try to remember the shortcuts for dragging forms out of and into lists backward and forward, and then maybe these in-list ones will seem easy. 😃

lread18:02:37

As a Calva noob, I am wondering if Calva/lsp looks at my local project clj-kondo hooks. I ask because I am getting warnings in Calva for things my hooks do handle when running clj-kondo from the command line.

bringe18:02:19

Hm, can you provide a repro case in an issue?

pez18:02:29

We are all a bit of Calva+lsp noobs, @lee. However, @brandon.ringe and @ericdallo are an amazing team to watch when they are trying to tame this beast.

❤️ 2
catjam 2
ericdallo18:02:39

@lee, clojure-lsp should use your .clj-kondo/config.edn just like if you were using only clj-kondo

lread18:02:52

Ok, cool. I’m happy to provide a repro in an issue. I’ll start with just linking to my project and describing, and then can isolate more at your request.

lread18:02:45

Raise in calva or clojure-lsp?

ericdallo18:02:10

I'd sugges open the issue on Calva, then we could analyze and open on clojure-lsp if it's a bug there 😉

clyfe19:02:56

Backspace positional in calva-extras - powerlevel 80%. (For the rest 20% I need sexp parsing apis.)

lread20:02:54

Thanks team Calva, https://github.com/BetterThanTomorrow/calva/issues/1026, ignore my mention of clj-kondo hooks here on Slack, think I was on the wrong track there!

👍 1
borkdude20:02:16

You can temporarily disable diagnostics in LSP and use the standalone clj-kondo VSCode plugin

lread20:02:40

Ah, did not know I could do that, thanks! Will do and update issue.

borkdude20:02:06

This is what I do in emacs as well, since I usually run a bleeding edge clj-kondo

lread20:02:03

How do I disable diagnostics in LSP?

borkdude20:02:18

I don't know about Calva but in emacs I set the variable lsp-diagnostics-provider :none

ericdallo20:02:34

Probably Calva does not support that 😕 but I'd not recommend doing this since the lint on the file reflects on clj-kondo analysis, so your code could show it's correct because of a newer version of clj-kondo or something like that, but clojure-lsp is not being able to parse the code or understands it

borkdude20:02:39

Of course the underlying problem should be addressed, this is why I said 'temporarily' :)

borkdude20:02:10

But even if you turn off diagnostics, clojure-lsp should be able to invoke clj-kondo for analysis

yes 1
ericdallo20:02:10

yes, a temporary flag on Calva could help on thses cases 😉

lread21:02:00

Ok, I shall leave issue as-is then.

borkdude22:02:08

I double checked and I don't think it's an issue with clj-kondo itself, rather an issue with maybe not picking up the config correctly in lsp / calva (not sure how these are wired up together)

borkdude22:02:11

Maybe it would help if calva / lsp could display the effective config used somehow

borkdude22:02:45

You can see this when invoking clj-kondo.core/run! and then pprinting the returned :config

bringe22:02:59

More discussion in the linked PR

ericdallo22:02:38

Yeah, confirmed the issue is on clojure-lsp side, it's using the home clj-kondo dir instead of the project config 😕

lread22:02:20

Hey, that was quick, and probably an easy fix! Nice!

ericdallo22:02:17

🤞 Looking into it right now

1
thanks2 1
ericdallo23:02:32

@U04V15CAJ I wondering if clojure-lsp should find the clj-kondo config to pass it via the clj-kondo API

borkdude23:02:15

clj-kondo already has logic to find its config. why pass it?

ericdallo23:02:17

Is there any way to pass some configs that we want (like cache, analysis etc) but still make clj-kondo keep the behaviour of find the configs

borkdude23:02:39

yes, you just pass :config which is a vector of additional configs which will be merged into the config that the user already has in .clj-kondo

ericdallo23:02:27

oh perfect, I think the issue is that ATM clojure-lsp is merging with a config from .lsp/config.edn (probably leftover after kondo integration 😅)

ericdallo23:02:31

will do the test right now

borkdude23:02:12

💤 👋

👋 1
ericdallo00:02:51

For some reason, when linting a single file, clj-kondo is not considering the configs, not sure is something that I'm doing wrong here, but I tried these two ways: from rewrite-clj-repro linked on the issue:

cat /home/greg/dev/rewrite-clj-repro/test/rewrite_clj/zip_test.cljc | clj-kondo --lint -
and informing the filename:
cat /home/greg/dev/rewrite-clj-repro/test/rewrite_clj/zip_test.cljc | clj-kondo --config '{:filename "/home/greg/dev/rewrite-clj-repro/test/rewrite_clj/zip_test.cljc"}' --lint -
both return:
<stdin>:10:27: warning: Unresolved var: z/of-string
<stdin>:10:39: warning: Unresolved var: z/root-string
<stdin>:26:26: warning: Unresolved var: z/find-tag-by-pos
<stdin>:27:26: warning: Unresolved var: z/replace
<stdin>:28:26: warning: Unresolved var: z/append-child
<stdin>:29:25: warning: Unresolved var: z/down
<stdin>:30:25: warning: Unresolved var: z/remove
<stdin>:47:16: warning: Unresolved var: z/rightmost
<stdin>:48:16: warning: Unresolved var: z/child-sexprs
<stdin>:57:16: warning: Unresolved var: z/up
<stdin>:68:16: warning: Unresolved var: z/right
<stdin>:82:17: warning: Unresolved var: z/insert-child
<stdin>:92:28: warning: Unresolved var: n/map-qualifier-node
<stdin>:106:36: warning: Unresolved var: z/node
<stdin>:106:43: warning: Unresolved var: n/map-context-clear
<stdin>:116:18: warning: Unresolved var: z/sexpr
<stdin>:136:18: warning: Unresolved var: z/reapply-context
linting took 226ms, errors: 0, warnings: 17

ericdallo02:02:20

Sorry, it seems the cache :true was messing up my tests

ericdallo03:02:08

Fixed removing the manual config that we were configuring before kondo full integration