Fork me on GitHub
#lsp
<
2022-04-17
>
bherrmann02:04:15

arg! I accidentally answered the initial startup clojure-lsp question about my root directory wrongly - now it always scans my home directory. Where does the project root get stored so that I can clear it? THANKS!

ericdallo03:04:27

In a emacs cache folder, lsp-mode manages it, you can fix it with lsp-workspace-folders-remove and then lsp

bherrmann12:04:27

HORRAY! Thanks (again) I seem to do this about once every 6 months. I will write it down this time.

ericdallo12:04:59

I plan to add that to emacs lap-mode troubleshooting

bherrmann12:04:24

Thanks, I did look through the troubleshooting and couldnt find it mentioned.

bherrmann12:04:25

and the side effect, "emacs hangs for like 30 seconds" while it parses thousand and thousands of files under my home directory is so disheartening....

bherrmann13:04:17

if this said also said: "to change see lsp-workspace-folders-remove" - that would be helpful.

ericdallo13:04:25

Yeah, I'll check why we can't ask a second question when the hoot is the home folder, to confirm it

bherrmann13:04:28

Yea, the scenarios is; I create a file in my home dir; like "scrap.clj" then I edit it with emacs. often I want to evaluate something quickly - and I am thinking of the problem I want to solve and I skip over that initial question (as I most often want to just use the current directory) - then I get stuck my home directory always being scanned. Even when I create a new project directory and move my scrap.clj into it. So once I get into this situation I am quite baffled about how to get out.

bherrmann13:04:30

By the way, clojure-lsp is so wonderful! It really is fabulous. I sometimes find myself developing for quite a while before I realize I'm not jacked in yet. MUCH THANKS!

ericdallo13:04:29

Awesome! I remember the first time I realized I was not using a repl after some time coding in the project :)

👍 1
ericdallo13:04:49

Yeah, not sure there is a better way if you really created the file on the home folder

bherrmann13:04:37

Yea, I can tape "lsp-workspace-folders-remove" to my screen - but I'm just thinking about someone else can get out of that situation. Of course, updating the troubleshooting is a great idea. I did pop around into the lsp-log buffer and look for clues there. Perhaps if starting up takes longer than 4 seconds, it should log a message in the lsp-log buffer... saying like "clojure-lsp initialization took 33 seconds - is your project root correct? it can altered with lsp-workspace-folders-remove" . or something like that...

ericdallo13:04:56

Yeah, I realized we already show a confirmation when the root is home 😅

bherrmann13:04:27

you mean this? This is very helpful (it warns you about why things are not right) but this message seems to show up after the scan has taken place - and it doesnt help me figure out how to change the directory.

bherrmann13:04:45

FYI: $ clojure-lsp --version clojure-lsp 2022.03.31-20.00.20 clj-kondo 2022.03.10-SNAPSHOT

ericdallo13:04:49

Will double check if that is working properly, talking with other lsp-mode maintainers at their discord they said it should work

bherrmann13:04:31

perhaps my lsp version is behind.

ericdallo13:04:24

I suggest using melpa unstable of lsp-mode

bherrmann13:04:23

ok, many thanks!