From 1c8d062c5f474ef33ffb056ab73cafaeaae2d7fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 5 Oct 2019 12:32:23 +0100 Subject: [PATCH] Much less noisy mode line * eglot.el (eglot--mode-line-format): Simplify. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/236 --- lisp/progmodes/eglot.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index cfcfaa7d68a..0a9da05b1c6 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1314,7 +1314,7 @@ Uses THING, FACE, DEFS and PREPEND." (nick (and server (eglot--project-nickname server))) (pending (and server (hash-table-count (jsonrpc--request-continuations server)))) - (`(,_id ,doing ,done-p ,detail) (and server (eglot--spinner server))) + (`(,_id ,doing ,done-p ,_detail) (and server (eglot--spinner server))) (last-error (and server (jsonrpc-last-error server)))) (append `(,(eglot--mode-line-props "eglot" 'eglot-mode-line nil)) @@ -1332,15 +1332,13 @@ Uses THING, FACE, DEFS and PREPEND." (format "An error occured: %s\n" (plist-get last-error :message))))) ,@(when (and doing (not done-p)) - `("/" ,(eglot--mode-line-props - (format "%s%s" doing - (if detail (format ":%s" detail) "")) - 'compilation-mode-line-run '()))) + `("/" ,(eglot--mode-line-props doing + 'compilation-mode-line-run '()))) ,@(when (cl-plusp pending) `("/" ,(eglot--mode-line-props - (format "%d outstanding requests" pending) 'warning + (format "%d" pending) 'warning '((mouse-3 eglot-forget-pending-continuations - "fahgettaboudit")))))))))) + "forget pending continuations")))))))))) (add-to-list 'mode-line-misc-info `(eglot--managed-mode (" [" eglot--mode-line-format "] "))) -- 2.39.2