Has anyone encountered the lsp
layer being too aggressive, prompting if I “want to watch all files” in some project that I don’t even have open right now? It’s also not part of my treemacs workspace. I’m pulling my hair out trying to stop lsp
from even looking at directories that I’m uninterested in on startup.
I found LSP very aggressive by default. Took me a while to figure how to tone it down and just give me a few useful things. It's still a bit too invasive for me, but has a few things missing from cider
LSP will trigger when ever a file is open for a project. I used to have lots of layouts, one for each project, that really complicates things with LSP.
I need to figure out how to just use LSP when I want it there. I haven't found out how to switch it off when it's already running without disabling LSP completely and restarting Emacs
That’s what I’ve found as well. It seems to “latch on” to projects that I’ve opened once in the past. Now I want to work on project X and LSP keeps starting up for the project that I’m not interested in anymore. I’m looking everywhere for some kind of LSP project list/cache/recent files etc to no avail…
Ooh…`lsp-workspace-folders-remove` seems close
That does sound useful. Let me know what works
Playing around. That almost seemed to work. It no longer prompts to “watch all files” for that project after I used lsp-workspace-folders-remove
on it, and then restarted emacs. However, now I keep getting the file is not part of any project. Selection action:
prompt for the file from that removed project that I don’t have open anywhere….frustrating…
LSP must keep some kind of permanent file list of everything you touch
I think the issue is that spacemacs is saving/restoring all the buffers even on exit, and LSP is scanning those buffers for potential targets. Is it possible to prevent emacs from restoring buffers from previous sessions? Tried (desktop-save-mode -1)
in my user-config to no avail…
Might be related to layouts…not sure…I don’t personally use layouts at all
I do want Spacemacs to remember buffers and project, that is why I use layouts. Layouts are more important to me than LSP as I regularly work on multiple projects. It's another reason I have struggled to adopt LSP myself.
You can just disable file watchers with lsp-enable-file-watchers nil
https://emacs-lsp.github.io/lsp-mode/page/performance/#ignore-watch-foldersfiles
lsp-modeline--enable-diagnostics
is still wrong on docs, it should be lsp-modeline-diagnostics-enable