This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-22
Channels
- # announcements (7)
- # babashka (1)
- # beginners (87)
- # boot (1)
- # cider (1)
- # clj-kondo (33)
- # cljfx (1)
- # cljs-dev (8)
- # clojars (3)
- # clojure (105)
- # clojure-austin (3)
- # clojure-europe (74)
- # clojure-finland (1)
- # clojure-korea (4)
- # clojure-nl (1)
- # clojure-uk (6)
- # clojurescript (10)
- # conjure (9)
- # cursive (29)
- # datalog (6)
- # datomic (13)
- # emacs (3)
- # events (4)
- # figwheel-main (1)
- # gratitude (1)
- # humbleui (6)
- # introduce-yourself (7)
- # jackdaw (1)
- # jobs (1)
- # lsp (29)
- # malli (3)
- # nbb (2)
- # podcasts-discuss (1)
- # portal (5)
- # re-frame (4)
- # reitit (28)
- # remote-jobs (5)
- # shadow-cljs (38)
- # tools-deps (46)
- # vim (6)
- # xtdb (24)
LSP tried to index the parent path on MacOSX.
I open my user level ~/.config/clojure/deps.edn
for the first time in Emacs on MacOSX and pressed i
to index the project. It seems LSP tried to index the whole of the ~/.config
directory, as LSP said there were hundreds of files to index.
Looking at the describe session it has /Users/practicalli/.config
as the path.
I think it may be MacOSX specific (or maybe something I did to this Mac), as I get the correct path in the diagnostics on Linux
lsp-mode asked the project-root and you confirmed with i
, if you don't agree with that project-root, you should lsp-workspace-folders-remove
and then lsp
again and this time use I
to select the correct folder dir
Nope, I assumed LSP had the right project root (as its always got it right before on Linux). I'll remove the root it's added and pay more attention next time :rolling_on_the_floor_laughing: Thanks
.
to add the project at the current directory did the trick
Released clojure-lsp 2022.06.22-14.09.50 with mainly fixes for consistency and become a even more reliable tool!
• General
◦ clojure-lsp has a flake.nix now, being able to be built using clj-nix. https://github.com/clojure-lsp/clojure-lsp/pull/999
◦ Remove
use-source-paths-from-classpath
setting, its value was already true and disabling it could cause false-positives.
◦ Add compute-external-file-changes
setting as true by default, when enabled it will consider file changes outside editor like git branch changes and update analysis, avoiding the need to restart server when a file is changed outside editor, this will only work if client file-watchers is enabled. https://github.com/clojure-lsp/clojure-lsp/issues/1002
◦ Bump lsp4clj to 0.4.1.
◦ Remove deprecated disabled setting :linters :clj-kondo :async-custom-lint?
. https://github.com/clojure-lsp/clojure-lsp/issues/1017
◦ Fix references and code lens of defrecord/deftype for cljs files. https://github.com/clojure-lsp/clojure-lsp/issues/1055
◦ Fix clean-ns to move reader conditionals to before normal requires. https://github.com/clojure-lsp/clojure-lsp/issues/1057
◦ Add new optional linter: https://github.com/clj-depend/clj-depend integration. https://github.com/clojure-lsp/clojure-lsp/issues/957
◦ Add new setting :source-paths-ignore-regex
to filter source-paths that are auto generated for example for cljs projects, the default value should be enought for most cases (`["resources." "target."]`), replacing old ignore-classpath-directories
.
◦ Bump clj-kondo to 2022.06.22.
• Editor
◦ Add support to rename namespace of namespaced keywords like re-frame events/subs. https://github.com/clojure-lsp/clojure-lsp/issues/978
◦ Improve performance of find-declaration feature. https://github.com/clojure-lsp/clojure-lsp/issues/1021
◦ Fix to avoid suggesting an alias from a clj file to a cljs file. https://github.com/clojure-lsp/clojure-lsp/issues/1024
◦ Find references of namespace usages now find all namespace usages on project, not only the definition. https://github.com/clojure-lsp/clojure-lsp/issues/1022
◦ Improve element selected on textDocument/hover
, showing the function being called instead of the closest element found backwards. https://github.com/clojure-lsp/clojure-lsp/issues/995
◦ Fix drag from quoted symbols and other special nodes https://github.com/clojure-lsp/clojure-lsp/issues/969
◦ Drag requests two smaller edits, instead of one large edit, potentially avoiding flicker. https://github.com/clojure-lsp/clojure-lsp/issues/1043
◦ Drag is disabled between clauses, to avoid arbitrarily choosing one to move. https://github.com/clojure-lsp/clojure-lsp/issues/1030
◦ Cursor doesn't move within dragged clause. https://github.com/clojure-lsp/clojure-lsp/issues/1029
◦ Improve performance of drag forward.
◦ Avoid invalid cached analysis and document text after a rename. https://github.com/clojure-lsp/clojure-lsp/issues/1049
◦ Improve lint performance by only linting references files when usage is added or removed. https://github.com/clojure-lsp/clojure-lsp/issues/1019
◦ Extracted functions are private. https://github.com/clojure-lsp/clojure-lsp/issues/1039
◦ Fix errors when Emacs lock files are linted. https://github.com/clojure-lsp/clojure-lsp/issues/1054
Main highlights:
We have a new linter 🎉 integrating with https://github.com/clj-depend/clj-depend, quite useful for projects with a ns stucture stanrdard that should be followed, kudos to @contato794 for the help!
We fixed a bug introduced some releases ago where clojure-lsp could consider target/resources folders as source-paths making find-definition and other features go to those files
Now, clean-ns
move reader conditionals to top following other tools
Finally, clojure-lsp should detect changes on files outside editor, like git branch changes, doesn't need to restart the LSP process anymore
We now have Mac M1 native binary thanks to @borkdude’s help!
Thanks for all contributors and sponsors which just help on making clojure-lsp a better tool each release!
> this will only work if client file-watchers is enabled.
How do clients do that? (just wondering if it will be applied to eglot
).
LSP clients should watch file changes, lsp-mode does that via the flag lsp-enable-file-watchers
, I don't know about eglot, unfortunatelly
Got it. If I understand correctly, the changelog indicates that it will only works if the client somehow knows that the files have been changed (which is more general than ‘enabling file watchers’, which seems very specific to lsp-mode
).
For further reference @U976F1AR2, the LSP specification says that LSP clients (editors) should watch for file changes, not LSP servers (clojure-lsp). See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWatchedFiles
Oh, interesting. Didn’t know the spec included those implementation details, but it makes sense, yeah.
m1 is so much faster
How did you install it, @U0509NKGK ?
first i installed m1 homebrew https://stackoverflow.com/questions/66666134/how-to-install-homebrew-on-m1-mac then i simply installed it with this instruction: https://clojure-lsp.io/installation/
Then you are still using the amd64 binary since the brew package isn't updated yet. I have two open PRS for that
damn it, so it seems.
@UKFSJSM38 mentioned m1 support in the release notice above, false positive?
• https://github.com/clojure-lsp/clojure-lsp/releases/download/2022.06.22-14.09.50/clojure-lsp-native-macos-aarch64.zip • https://github.com/clojure-lsp/clojure-lsp/releases/download/2022.06.22-14.09.50/clojure-lsp-native-macos-amd64.zip the first one here is the M1 version right?
okidokes cool
I updated clojure-lsp via vscode calva, still have the intel binary :thinking_face: