Fork me on GitHub
#lsp
<
2024-04-08
>
lassemaatta06:04:07

When running eglot-code-actions, it looks like I no longer get the Add require '[whatever]' x N option for unresolved symbols. Any one else seen this, or have I just (again) broken my emacs/lsp config? (EDIT: works fine with lsp-mode)

lassemaatta06:04:21

seems to work fine with lsp-mode :man-shrugging:

ericdallo11:04:52

try to check the json messages between client and server of eglot and lsp-mode to understand what's different

Nim Sadeh20:04:49

I am experiencing the strangest thing in LSP with Emacs Prelude. I have a folder (let's call it clojure-projects) that houses my clojure projects. All the projects in it were created using lein new app . If I open any of these projects, I get the message LSP:: connected to [clojure-lsp:16038 ~/clojure-projects/] or something along those lines in my Emacs, when I open any file in one of those projects s.a., project.clj Since yesterday, I created a new project new-project in the same directory using the same method as before. However, whenever I open any file there including the project.clj file, the message is LSP:: connected to [clojure-lsp ~/clojure-projects] . It's trying to connect on the parent folder for some reason, and attempting to index every lower-level file. since I refuse to allow it to index the entire parent folder, many LSP features don't work. I have tried deleting and re-creating the project and I get the same issue 😕 What can I do to fix this? I don't see a way to manually set the LSP path.

ericdallo20:04:07

that's a common lsp-mode problem where you accidentally import the wrong project root, you can remove it with lsp-workspace-folders-remove

Nim Sadeh20:04:51

Thank you so much! That worked. I can't believe how much time I spent frustrated by this. I have made about 10 clojure projects in the past 6 months and every other time this just worked, so I wasn't used to spending time here. Do you have any idea as to how it got in this state?

ericdallo20:04:30

Not really, we had so many issues with wrong project roots in the past, we used to "guess" the root but that was way worst than today: "guess it and ask for user to confirm", the problem is that sometimes we guess it wrong and user confirms it 😅

ericdallo20:04:04

there is even a lsp-auto-guess-root variable, disabled by default

👍 2