Fork me on GitHub
#lsp
<
2023-04-29
>
Drew Verlee21:04:55

what command will associate a project with a workspace, given i think of the "workspace" as a directory where i want lsp to watch code and that directory is has been added via "lsp-workspace-folders-add"? I ran "lsp-workspace-open" and "lsp-workspace-restart" and i'm told the "buffer isn't associated with a workspace" but the buffer is showing me the directory that was added. Basically I feel like if i accidental don't add a workspace correctly i have to shut down emacs and restart it to get that initial prompt. I have a directory that has several projects (deps.edn at the roots of the subdirectories e.g root/backend/deps.edn root/frontend/deps.edn and i want to be separate lsp projects so lsp doesn't have more code to potential get tripped up by.

Drew Verlee21:04:02

ok, the story improves if I make sure i'm in emacs clojure mode, and not just in a directory buffer. It's hard to tell where the boundaries are sometimes.

Drew Verlee21:04:34

and i can get the information about the lsp workspace from lsp-clojure-server-info.

ericdallo00:04:58

those are correct commands, and lsp to force try to start LSP on that buffer

ericdallo00:04:57

so usually I just use lsp-workspace-folders-remove to quickly check the workspaces that exist and/or remove a wrong project root, and lsp to get the prompt if the buffer is not in a imported root

Drew Verlee01:04:05

Thanks Eric, it's very useful to know i can get the prompt again using the lsp command.

👍 2