From f6d3ee5889414fd16feac792b5d0d5677cffa63c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 2 Nov 2019 15:50:02 -0400 Subject: [PATCH] tools/lsp: fix lsp-workspace-restart --- modules/tools/lsp/config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))