This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-09
Channels
- # adventofcode (93)
- # announcements (11)
- # babashka (7)
- # babashka-sci-dev (17)
- # beginners (73)
- # biff (7)
- # calva (3)
- # cider (1)
- # clj-kondo (160)
- # clj-together (12)
- # clojure (44)
- # clojure-art (2)
- # clojure-europe (12)
- # clojure-losangeles (1)
- # clojure-nl (3)
- # clojure-norway (22)
- # clojure-uk (2)
- # clojurescript (8)
- # clr (1)
- # cursive (6)
- # data-science (1)
- # datomic (1)
- # emacs (6)
- # events (1)
- # exercism (1)
- # fulcro (6)
- # graphql (2)
- # introduce-yourself (1)
- # lsp (18)
- # nrepl (7)
- # off-topic (45)
- # polylith (25)
- # portal (25)
- # practicalli (3)
- # re-frame (14)
- # reagent (28)
- # reitit (2)
- # releases (2)
- # shadow-cljs (73)
- # sql (11)
- # tools-deps (12)
- # transit (4)
- # xtdb (4)
Released https://clojure-lsp.io/ https://github.com/clojure-lsp/clojure-lsp/releases/tag/2022.12.09-15.51.10 with fixes, Improvements and new features! 🚀
• General
◦ Fix rename issue with VS-Code/Calva on MS-Windows. https://github.com/clojure-lsp/clojure-lsp/issues/1388
◦ Only publish progress on initialize if client provided a
workDoneProgress
. https://github.com/clojure-lsp/clojure-lsp/issues/1363
◦ Bump clj-kondo to 2022.12.08
.
◦ Avoid wrong clj-kondo configs in case clojure-lsp process is spawned from a different directory than project-root.
◦ Fall back on CLJS var when finding definition from Clojure and nothing was found. https://github.com/clojure-lsp/clojure-lsp/issues/1403
• Editor
◦ Show better icons for multimethods, var-arg fns, protocols, records, interfaces and types on workspace/symbol
and textDocument/documentSymbol
.
◦ Inlining the last binding of a let removes the let. https://github.com/clojure-lsp/clojure-lsp/issues/210
◦ Allow import java classes via code-actions Add import 'x.y.Z'
.
◦ Make add-import
command/code-action smarter, checking if there is already a package import to just include the classname instead of full import.
◦ Add new refactoring cycle-keyword-auto-resolve
, e.g. ::bar
-> :foo/bar
and vice-versa. https://github.com/clojure-lsp/clojure-lsp/issues/1128
◦ Supporting find definition/references/implementations of definterface
.
◦ Avoid watching ignored source-paths, causing find-definition/references and other features go to wrong files.
• API/CLI
◦ Allow specify analysis type for dump
command, default to analyze project only analysis. https://github.com/clojure-lsp/clojure-lsp/issues/1383
◦ Add :result
to the dump command. https://github.com/clojure-lsp/clojure-lsp/issues/1390
◦ Important regression fix where clojure-lsp may do inconsistent lint when classpath scan fail without showing to user the error.
Main highlights:
• There is a new refactoring/code action cycle-keyword-auto-resolve, check the gif!
• Finally, clojure-lsp now suggests Add import
code actions, pretty useful when you know the class name but not the full package and clojure-lsp will add a :import
for you ✨
• Avoid analyzing files inside ignored source-paths folders (`target` for example), which would cause find-definition/references to go to that folder wrongly, causing lots of confusion.
• Improved overall https://clojure-lsp.io/, I have in mind improve it even better adding project cases and how configure lsp/your editor for the best UX!
Thank you for all contributors and sponsors!


@UKFSJSM38 what initialization options are now needed exactly to get the progress reports on startup? I've tried workDoneProgress
and workDoneToken
but neither work for me
@UDVJE9RE3 if using emacs lsp-mode, it should work out of the box without any changes, are you using other client?
Eglot, it doesn't set any initialization options out of the box
it seems to be workDoneToken
, lsp-mode passes "1" hardcoded https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L7523
Ah. That is outside the initializationOptions though. I'll have to modify the client code
It is strange that lsp mentions the workDoneToken
in the description of https://microsoft.github.io//language-server-protocol/specifications/lsp/3.17/specification/#initialize, but it is not typed in the definition of the "InitializeParams" type.
Either way, I can't seem to get this working in Eglot now. Not that anyone using it will notice. I just got support for showing progress notifications in Eglot and Emacs 29 today. I need to debug more
Oh, that's because InitizlizeRequest extends WorkDoneProgressParams
@UDVJE9RE3 it's https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgressParams
It takes me a while but I usually catch up lol
It always leaves me wanting for more hyperlinks in the spec document Edit: somehow I had javascript disabled on the lsp spec website. Turns out everything is hyperlinked lmao
I've got it working now, Emacs was using my byte compiled eglot instead of the plain eglot.el. Thanks for pointing me in the right direction, and thanks for all the great stuff in this release!
The inline let refactor thing is awesome! It's a really nice improvement! Thank you very much!