Optimize performance of lsp indicator.

This commit is contained in:
Vincent Zhang 2019-03-12 00:59:28 +07:00
parent 4c5a8d3ab9
commit 292f7bd238

View file

@ -86,6 +86,7 @@
(declare-function aw-update 'ace-window) (declare-function aw-update 'ace-window)
(declare-function aw-window-list 'ace-window) (declare-function aw-window-list 'ace-window)
(declare-function battery-format 'battery) (declare-function battery-format 'battery)
(declare-function eglot--current-server 'eglot)
(declare-function eglot--major-mode 'eglot) (declare-function eglot--major-mode 'eglot)
(declare-function eglot--project-nickname 'eglot) (declare-function eglot--project-nickname 'eglot)
(declare-function eglot--spinner 'eglot) (declare-function eglot--spinner 'eglot)
@ -1508,7 +1509,7 @@ mouse-3: Reconnect to server")
#'lsp-restart-workspace)) #'lsp-restart-workspace))
map))) map)))
" ")) " "))
((and (fboundp 'eglot--current-server) (eglot--current-server)) ((bound-and-true-p eglot--managed-mode)
(pcase-let* ((icon (if doom-modeline-icon (pcase-let* ((icon (if doom-modeline-icon
(doom-modeline-icon-faicon "rocket" :v-adjust -0.0575) (doom-modeline-icon-faicon "rocket" :v-adjust -0.0575)
"EGLOT")) "EGLOT"))