Fork me on GitHub
#lsp
<
2022-06-22
>
practicalli-john12:06:58

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

ericdallo13:06:42

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

practicalli-john13:06:49

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

👍 1
practicalli-john13:06:56

. to add the project at the current directory did the trick

ericdallo18:06:11

clojure-lsp 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! gratitude

🎉 14
apt20:06:29

> this will only work if client file-watchers is enabled. How do clients do that? (just wondering if it will be applied to eglot).

ericdallo20:06:46

LSP clients should watch file changes, lsp-mode does that via the flag lsp-enable-file-watchers , I don't know about eglot, unfortunatelly

apt20:06:09

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).

👍 1
jacob.maine23:06:05

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

apt23:06:46

Oh, interesting. Didn’t know the spec included those implementation details, but it makes sense, yeah.

robert-stuttaford05:06:54

m1 is so much faster

borkdude05:06:43

How did you install it, @U0509NKGK ?

borkdude05:06:55

Then you are still using the amd64 binary since the brew package isn't updated yet. I have two open PRS for that

robert-stuttaford05:06:26

damn it, so it seems.

robert-stuttaford05:06:48

@UKFSJSM38 mentioned m1 support in the release notice above, false positive?

borkdude05:06:35

The binary is part of the release on GitHub but the scripts must still be updated

Tuomas-Matti Soikkeli06:06:16

I updated clojure-lsp via vscode calva, still have the intel binary :thinking_face:

borkdude07:06:16

Same reason. Calva needs to be updated :) cc <!subteam^S03BGSAUPTQ|@calva-team>

👌 1
👀 1
pez07:06:38

Please file an issue about it @UM1PCCLNN.

👍 1
pez07:06:16

Super awesome great news about this native binary being available now! 🎉 clojure-lsp gratitude

👍 1
ericdallo10:06:15

I should merge install scripts soon

bringe14:06:25

Great work to all who contributed! clojure-lsp

🎉 1