aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbard <[email protected]>2024-03-15 15:54:43 -0400
committerbard <[email protected]>2024-03-15 15:54:43 -0400
commit54b8c55a52427d4c3149b78b58f60a6ee86344da (patch)
tree058943748c7e20e377c837081ee829a9a1bf0a7a
parent25cd67f7004682423a7613119ae33b2de97c4124 (diff)
added eglot module
-rw-r--r--bard-elisp/bard-modeline.el12
-rw-r--r--bard-emacs-modules/bard-emacs-modeline.el1
2 files changed, 13 insertions, 0 deletions
diff --git a/bard-elisp/bard-modeline.el b/bard-elisp/bard-modeline.el
index f5dcbb1..b8b4aca 100644
--- a/bard-elisp/bard-modeline.el
+++ b/bard-elisp/bard-modeline.el
@@ -406,6 +406,7 @@ face. Let other buffers have no face.")
((derived-mode-p 'text-mode) "§")
((derived-mode-p 'prog-mode) "λ")
((derived-mode-p 'comint-mode) ">_")
+ ((derived-mode-p 'emms-playlist-mode) "♪")
(t "◦"))))
(propertize indicator 'face 'shadow)))
@@ -591,6 +592,17 @@ TYPE is usually keyword `:error', `:warning' or `:note'."
"Mode line construct displaying `flymake-mode-line-format'.
Specific to the current window's mode line.")
+(with-eval-after-load 'eglot
+ (setq mode-line-misc-info
+ (delete '(eglot--managed-mode (" [" eglot--mode-line-format "] ")) mode-line-misc-info)))
+
+(defvar-local prot-modeline-eglot
+ `(:eval
+ (when (and (featurep 'eglot) (mode-line-window-selected-p))
+ '(eglot--managed-mode eglot--mode-line-format)))
+ "Mode line construct displaying Eglot information.
+Specific to the current window's mode line.")
+
;;;; Miscellaneous
(defvar-local prot-modeline-misc-info
diff --git a/bard-emacs-modules/bard-emacs-modeline.el b/bard-emacs-modules/bard-emacs-modeline.el
index 9327d87..a86f233 100644
--- a/bard-emacs-modules/bard-emacs-modeline.el
+++ b/bard-emacs-modules/bard-emacs-modeline.el
@@ -79,6 +79,7 @@
prot-modeline-vc-branch
" "
prot-modeline-flymake
+ prot-modeline-eglot
" "
prot-modeline-align-right
prot-modeline-misc-info))