diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 22094dc1f..4349943c8 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -38,7 +38,9 @@ This can be a single company backend or a list thereof. It can be anything This gives the user a chance to open other project files before the server is auto-killed (which is usually an expensive process)." :around #'lsp--shutdown-workspace - (if lsp-keep-workspace-alive + (if (or lsp-keep-workspace-alive + (eq (lsp--workspace-shutdown-action lsp--cur-workspace) + 'restart)) (funcall orig-fn) (when (timerp +lsp--deferred-shutdown-timer) (cancel-timer +lsp--deferred-shutdown-timer))