From c646be4802416440bba1e3df2b92d3dfd5f0876c Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sat, 18 Oct 2025 22:04:55 +0100 Subject: Add eglot to modeline --- modally.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'modally.el') diff --git a/modally.el b/modally.el index 41fdf88..062440a 100644 --- a/modally.el +++ b/modally.el @@ -175,6 +175,15 @@ (modally--separator) )))) +(defun modally--eglot () + "Return eglot info." + (when (and (featurep 'eglot) + eglot--managed-mode) + (format " %s %s %s" + (propertize "" 'face 'eglot-mode-line) + (car (last (eglot--mode-line-format))) + (modally--separator)))) + ;; VARIABLES (defvar modally-display-read-only '(:eval (modally--read-only-status)) @@ -214,6 +223,10 @@ '(:eval (modally--org-timer)) "Modeline construct to display `org-timer' info.") +(defvar modally-display-eglot + '(:eval (modally--eglot)) + "Modeline construct to display eglot info.") + ;; set as risky local variable (dolist (construct '(modally-display-read-only modally-display-buffer-name @@ -223,7 +236,8 @@ modally-display-line-column modally-display-file-size modally-display-flymake - modally-display-org-timer)) + modally-display-org-timer + modally-display-eglot)) (put construct 'risky-local-variable #'stringp)) ;; FORMATS @@ -235,6 +249,7 @@ modally-display-org-timer modally-display-line-row modally-display-line-column + modally-display-eglot modally-display-git-branch modally-display-file-size modally-display-flymake -- cgit