diff options
| author | Blake Romero <blake@developercraft.com> | 2025-10-18 22:04:55 +0100 |
|---|---|---|
| committer | Blake Romero <blake@developercraft.com> | 2025-10-18 22:04:55 +0100 |
| commit | c646be4802416440bba1e3df2b92d3dfd5f0876c (patch) | |
| tree | e422f4f05d7f42ea48d3c45f81ecf23e99b5f25b /modally.el | |
| parent | e9f1866c8593ce94553e9e2edcf7d9502b10b377 (diff) | |
Add eglot to modeline
Diffstat (limited to 'modally.el')
| -rw-r--r-- | modally.el | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 |
