From 7b9a1e5dd668efce42bcde02351b8912d2468479 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Sat, 23 Mar 2019 01:49:20 +0800 Subject: [PATCH] Update hooks for lsp indicator. See https://github.com/emacs-lsp/lsp-mode/issues/726. --- doom-modeline-segments.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 855a4f9..e1d83a7 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -138,7 +138,6 @@ (declare-function image-get-display-property 'image-mode) (declare-function jsonrpc--request-continuations 'jsonrpc) (declare-function jsonrpc-last-error 'jsonrpc) -(declare-function lsp--cleanup-hanging-watches 'lsp-mode) (declare-function lsp--workspace-print 'lsp-mode) (declare-function lsp-describe-session 'lsp-mode) (declare-function lsp-restart-workspace 'lsp-mode) @@ -1537,7 +1536,7 @@ mouse-3: Describe current input method") ;; (defvar doom-modeline--lsp nil) -(defun doom-modeline-update-lsp (&rest _) +(defun doom-modeline-update-lsp () "Update `lsp-mode' status." (setq doom-modeline--lsp (concat @@ -1581,7 +1580,7 @@ mouse-1: Reload to start server") map))) " "))) (add-hook 'lsp-mode-hook #'doom-modeline-update-lsp) -(advice-add #'lsp--cleanup-hanging-watches :after #'doom-modeline-update-lsp) +(add-hook 'lsp-after-uninitialized-hook #'doom-modeline-update-lsp) (defvar doom-modeline--eglot nil) (defun doom-modeline-update-eglot ()