mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix #167: Eglot: Closing file issues error if server is shut down.
Also, 1. Change the icon color of eglot. 2. Optimize refreshing eglot.
This commit is contained in:
parent
f9984246d2
commit
fc098a6946
1 changed files with 5 additions and 5 deletions
|
@ -1584,8 +1584,8 @@ mouse-1: Reload to start server")
|
||||||
(face (cond
|
(face (cond
|
||||||
(last-error 'error)
|
(last-error 'error)
|
||||||
((and doing (not done-p)) 'compilation-mode-line-run)
|
((and doing (not done-p)) 'compilation-mode-line-run)
|
||||||
((cl-plusp pending) 'warning)
|
((and pending (cl-plusp pending)) 'warning)
|
||||||
(nick 'success)
|
(nick 'doom-modeline-highlight)
|
||||||
(t 'mode-line)))
|
(t 'mode-line)))
|
||||||
(help-echo (cond
|
(help-echo (cond
|
||||||
(last-error
|
(last-error
|
||||||
|
@ -1594,7 +1594,7 @@ mouse-3: clear this status" (plist-get last-error :message)))
|
||||||
((and doing (not done-p))
|
((and doing (not done-p))
|
||||||
(format "EGLOT\n%s%s" doing
|
(format "EGLOT\n%s%s" doing
|
||||||
(if detail (format "%s" detail) "")))
|
(if detail (format "%s" detail) "")))
|
||||||
((cl-plusp pending)
|
((and pending (cl-plusp pending))
|
||||||
(format "EGLOT\n%d outstanding requests" pending))
|
(format "EGLOT\n%d outstanding requests" pending))
|
||||||
(nick (format "EGLOT Connected (%s/%s)
|
(nick (format "EGLOT Connected (%s/%s)
|
||||||
C-mouse-1: Disply server errors
|
C-mouse-1: Disply server errors
|
||||||
|
@ -1608,7 +1608,7 @@ mouse-3: Reconnect to server" nick (eglot--major-mode server)))
|
||||||
(last-error
|
(last-error
|
||||||
(define-key map [mode-line mouse-3]
|
(define-key map [mode-line mouse-3]
|
||||||
#'eglot-clear-status))
|
#'eglot-clear-status))
|
||||||
((cl-plusp pending)
|
((and pending (cl-plusp pending))
|
||||||
(define-key map [mode-line mouse-3]
|
(define-key map [mode-line mouse-3]
|
||||||
#'eglot-forget-pending-continuations))
|
#'eglot-forget-pending-continuations))
|
||||||
(nick
|
(nick
|
||||||
|
@ -1641,7 +1641,7 @@ mouse-3: Reconnect to server" nick (eglot--major-mode server)))
|
||||||
((bound-and-true-p lsp-mode)
|
((bound-and-true-p lsp-mode)
|
||||||
doom-modeline--lsp)
|
doom-modeline--lsp)
|
||||||
((bound-and-true-p eglot--managed-mode)
|
((bound-and-true-p eglot--managed-mode)
|
||||||
(doom-modeline-update-eglot)))))
|
doom-modeline--eglot))))
|
||||||
|
|
||||||
(defun doom-modeline-override-eglot-modeline ()
|
(defun doom-modeline-override-eglot-modeline ()
|
||||||
"Override `eglot' mode-line."
|
"Override `eglot' mode-line."
|
||||||
|
|
Loading…
Reference in a new issue