This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-13
Channels
- # announcements (14)
- # babashka (13)
- # beginners (25)
- # biff (7)
- # calva (36)
- # clj-kondo (22)
- # clojure (31)
- # clojure-austin (1)
- # clojure-europe (12)
- # clojure-losangeles (4)
- # clojure-nl (1)
- # clojure-norway (61)
- # clojure-uk (4)
- # clojurescript (3)
- # datomic (24)
- # events (1)
- # humbleui (9)
- # leiningen (9)
- # lsp (30)
- # malli (3)
- # missionary (15)
- # off-topic (5)
- # re-frame (4)
- # reitit (7)
- # releases (2)
- # remote-jobs (4)
- # rewrite-clj (11)
- # ring-swagger (2)
- # sci (6)
- # xtdb (2)
- # yamlscript (3)
Released clojure-lsp 2024.03.13-13.11.00
including a clj-kondo bump fixing high memory usage fix from previous release.
ā¢ General
ā¦ Bump clj-kondo to 2024.03.13
fixing high memory usage issue.
ā¢ Editor
ā¦ Fix workspace/didChangeConfiguration
exception causing noise on logs. https://github.com/clojure-lsp/clojure-lsp/issues/1784
Questions about https://clojurians.slack.com/archives/C06MAR553/p1710347670492119?thread_ts=1710340978.443709&cid=C06MAR553 š§µ
Sorry to bother but I don't really get what those commands are used for (slurp, barf?), and regarding @U34K4458Xās comment about "pair movement commands", I do not know what that sentence means. I may have similar behavior already "custom keymapped" without knowing it, so I'm going to experiment a bit more right away. Also I may have conflated some terms but when I said "paredit" I mostly meant "what I'm used to in the context of Cursive", especially the structural editing part of the documentation where parens/etc are automatically matched, whitespace automatically tidied-up, etc. Does behave the same? Last time I checked, I did get that.
maybe the docs need an improvement likehttps://calva.io/paredit/
pair movement example
(let [foo 1
bar| 2])
run move up command
result:
(let [bar| 2
foo 1])
clojure-lsp-intellij does have auto paren matching, so yes, paredit is when you want to do actions like parens manipulation, that calva doc explains really well with images, maybe we should just link it to there š
Also, I added support for only what clojure-lsp supports in terms of paredit, which are the most used ones, no one never complained about the other missing paredit actions
Thanks @U34K4458X, that clears it up. Actually Cursive has some issues on this front.
@UKFSJSM38 does clojure-lsp format the code block when slurp/barf code actions used?
possible on other editors, not available for intellij yet, but a format whole buffer is pretty fast and would work too
Ah this defprotocols "find implementations" feature is bliss š¤¤
I wanna do improvements on the popup in the future, but I think the repl plugin needs more attention ATM
I had to open the file containing the implementation (defrecord) first to be able to find it from the defprotocol, does it mean that the project is "indexed" lazily?
Or maybe I didn't give "it" enough time.
"pair movement" doesn't seem to work in my case. Maybe I should tweak some setting, but out of the box my let form gets messed-up. Same this with "Strict mode" from Calva docs, I can unbalance pretty much anything. I'll take a look at lsp config and at my key bindings, maybe I'm missing some tuning?
> does it mean that the project is "indexed" lazily? No, but maybe the way I added this support you need to go to the definition first, but we can support it
@U1DLD0WNR maybe there is a bug on this parens manipulation indeed, feel free to give more detaisl
I don't see them in the paredit feature list, but how difficult would it be to add "move", "nav around", etc? In particular, I rely heavily on "forward/back sexp or up" from cursive to nav around inside my code. https://calva.io/paredit/
zed may have the same problem, so if we manage to add that to clojure-lsp server would be easier to add to other editors
I wrote a clj-kondo hook to look at sytax-quoted symbols in with-meta
calls. The hook doesn't work unless I've already linted/cached the other files, so on CI runs, it fails. This seems like the kind of feature that is better suited for clojure-lsp's whole project/classpath-aware linting. Is it possible to write hooks that happen after analyzing the whole project?
no, this is something that completely happens on clj-kondo side, but the idea is not bad, would be really nice if in a hook we could pass extra information, like a context that we could inject all the analysis or so, not sure if that makes sense c/c @U04V15CAJ
hooks api exposes the function api/ns-analysis
which already has a bunch of stuff, but this doesn't solve the order of namespaces that get linted
yeah, I suppose that only provides the analysis of that ns and not all the ones (especially because of the order too)
One solution (workaround rather) would be to lint the local source twice, once to populate the cache and once to detect real issues