This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-03
Channels
- # announcements (21)
- # aws (6)
- # babashka (28)
- # beginners (39)
- # biff (1)
- # calva (23)
- # cider (5)
- # clj-kondo (108)
- # clojure (11)
- # clojure-europe (17)
- # clojure-nl (2)
- # clojure-nlp (10)
- # clojure-uk (8)
- # clojurescript (29)
- # community-development (4)
- # conjure (20)
- # css (3)
- # datalevin (9)
- # datomic (3)
- # events (2)
- # figwheel-main (11)
- # fulcro (36)
- # honeysql (7)
- # humbleui (5)
- # interceptors (4)
- # introduce-yourself (3)
- # jobs (1)
- # lsp (51)
- # malli (1)
- # meander (71)
- # minecraft (8)
- # other-languages (18)
- # pathom (15)
- # polylith (25)
- # portal (10)
- # re-frame (5)
- # reitit (15)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (11)
- # tools-deps (27)
Released clojure-lsp 2022.05.03-12.35.40 with mostly really important performance improvements! 🚀
• General
◦ Bump clj-kondo to
2022.04.26-20220429.192438-2
.
◦ Decrease uncached startup time by 60-70%, by instructing clj-kondo to skip var definition bodies when analyzing deps. https://github.com/clj-kondo/clj-kondo/pull/1674
◦ Improve speed of alias/ns completions.
◦ Change alias/ns completions to return a label that matches the input.
◦ Support sorting classes inside package imports during clean-ns
. https://github.com/clojure-lsp/clojure-lsp/issues/932
◦ Avoid saving duplicate source-paths, not calling clj-kondo to analyze same filenames multiple times, improving startup speed.
◦ Improve progress report both on editor and CLI using new clj-kondo callback feature.
• Editor
◦ Support workspace/willRenameFiles
, renaming namespaces and all its references when a file is renamed.
◦ Don't save cache when classpath lookup failed.
◦ Wait for editor to apply edits before requesting cursor re-positioning. Fixes cursor positioning after drag in Calva.
◦ drag: Request edit only of changed clauses, not entire parent, reducing flicker.
• CLI/API
◦ Bump lsp4clj to 0.3.0
.
The most important changes are performance, lots of improvements regarding completion and startup time, with @jacob.maine's help we now scan classpath way faster.
We improved how clojure-lsp update the progress bar both on CLI and on editors, showing a way more precise percentage when starting server!
Also, we have a long waited new feature: support for when renaming files in editor, update namespace name and all references to it! This already worked if you rename the namespace using LSP rename, but now following new LSP spec we made it work if renaming files in editor as well!
This release was supported by https://www.clojuriststogether.org/

Just tried to do a rename file with neovim and coc, it no work 😞 I see the output in that CoC is sending a workspace/willRenameFiles
with the old and the new, but the response back from clojure-lsp is documentChanges []
Details in thread:
[Trace - 15:54:52] Sending request 'workspace/willRenameFiles - (8)'.
Params: {
"files": [
{
"oldUri": "file:///home/david/tmp/foo/foo.clj",
"newUri": "file:///home/david/tmp/foo/bar.clj"
}
]
}
[Trace - 15:54:52] Received response 'workspace/willRenameFiles - (8)' in 2ms.
Result: {
"documentChanges": []
}
the ns
stays at (ns foo)
with clj-kondo flagging it now as namespace does not match
from your snippet, it seems it's a temp file, not from a real project, right? if so, that's intended
yes, something to bring a valid classpath, please, check https://clojure-lsp.io/troubleshooting/#server-log
@U11EL3P9U could you try calling LSP rename on the namespace to check if the file and references are renamed properly, this works on clojure-lsp for some time, just to make sure source-paths and everything is working as expected
Same problemo. If okay with you, let's park this for now - I have to disappear for a bit. I'll gather some logs and post as an issue, just for reference.
Maybe @UMMMKKADU could help testing this as well?
i'm also looking into this, lol, so if I find something I'll post here
Hello!
I'm trying clojure-lsp
on a large project and I don't think it's working... but I can't find out why 😕
It looks like references are only found for the file I'm currently in.
I deleted the cache file, just in case, but it doesn't appear to have any effect.
Any suggestion what I could try next?
Definitions are also always "not found"
@frozenlock after deleting the cache you should restart your workspace in order for clojure-lsp to lint the classpath
Yes, I called lsp-restart-workspace
but it didn't work. (Still no effect)
by default clojure-lsp lints your classpath using clojure -Spath
when you have a deps.edn. Does that make sense for your project?
Ah, probably not. It's a repo with many lein projects
You can configure the classpath cmd, but maybe @UKFSJSM38 can show you where this is
unless you have a project.clj on the root that bring correct classpath for all subprojects
for debugging if it's working, https://clojure-lsp.io/troubleshooting/#server-log
Alas, it's just hundreds of lein projects
you could write a script that concatenates all the source paths from the sub projects and uses that as the classpath command
well, hundreds of services sounds a lot, you won't be working on those hundreds at the same time probably, I suggest you open only the project you are working
When trying with a single project, llsp always recreates the cache a the repo root, instead of the where the project.clj
is located. Am I missing a config somewhere?
Ah yes it works!