emacs

Casey 2025-09-18T14:28:09.780729Z

My emacs sessions live around a long time because I use the emacs dameon.. over many days I work on many projects each which spawns their own clojure-lsp. Eventually I might close all the buffers for a project, but the clojure-lsp process sticks around using a lot of memory. I can see it with M-X lsp-describe-session how can I kill it from within emacs?

ericdallo 2025-09-18T14:32:14.527749Z

lsp-workspace-shutdown ?

Casey 2025-09-18T14:33:10.778109Z

that shuts down my current workspace, I'm looking for a similar function that lets me shut down other workspaces

Casey 2025-09-18T14:35:36.996389Z

I guess I need to remember to call lsp-workspace-shutdown before closing the last buffer

ericdallo 2025-09-18T14:35:51.587429Z

you can pass the workspace as a arg to that function

Casey 2025-09-18T14:38:10.272379Z

what's a "workspace"? what would I type?

ericdallo 2025-09-18T14:40:36.289919Z

it's a complex structure, but you can get it from (lsp-workspaces) or (lsp--session-workspaces (lsp-session)) to get current one

ericdallo 2025-09-18T14:41:02.697489Z

probably there are other functions to handle that too

Casey 2025-09-18T14:42:45.997319Z

ah, ok so i'd have to write some elisp for that

Casey 2025-09-18T14:43:10.722429Z

it's a shame lsp-describe-session doesn't provide any actions to operate on the sessions

ericdallo 2025-09-18T14:43:43.873079Z

ah yeah, some elisp will be needed I guess