From 6ff5691858ae8b42afe124f71d8f157793c94c59 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Tue, 20 Jan 2026 17:08:23 +0100 Subject: [PATCH] feat(lib): Annotate doom/help-modules --- lisp/lib/help.el | 17 +++++++++++++++-- modules/themes/.doommodule | 0 modules/themes/doom/.doommodule | 0 modules/ui/dashboard/.doommodule | 0 4 files changed, 15 insertions(+), 2 deletions(-) delete mode 100644 modules/themes/.doommodule delete mode 100644 modules/themes/doom/.doommodule delete mode 100644 modules/ui/dashboard/.doommodule diff --git a/lisp/lib/help.el b/lisp/lib/help.el index 1426ec8f8b3..30a20a4925c 100644 --- a/lisp/lib/help.el +++ b/lisp/lib/help.el @@ -361,15 +361,28 @@ without needing to check if they are available." (helpful-callable fn) (describe-function fn)))) +(defun doom--help-module-description (readme) + (when (file-regular-p readme) + (with-temp-buffer + (insert-file-contents readme nil 0 1024) + (when (search-forward "#+subtitle: " nil t) + (string-trim (buffer-substring (point) (line-end-position))))))) + (defun doom--help-modules-list () (cl-loop for (cat . mod) in (doom-module-list 'all) for readme-path = (or (doom-module-locate-path (cons cat mod) "README.org") (doom-module-locate-path (cons cat mod))) for format = (if mod (format "%s %s" cat mod) (format "%s" cat)) + for description = (doom--help-module-description readme-path) + for propformat = (if description + (propertize format 'display + (concat format #(" " 0 1 (display (space :align-to 30))) + description)) + format) if (doom-module-active-p cat mod) - collect (list format readme-path) + collect (list propformat readme-path) else if (and cat mod) - collect (list (propertize format 'face 'font-lock-comment-face) + collect (list (propertize propformat 'face 'font-lock-comment-face) readme-path))) (defun doom--help-current-module-str () diff --git a/modules/themes/.doommodule b/modules/themes/.doommodule deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/modules/themes/doom/.doommodule b/modules/themes/doom/.doommodule deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/modules/ui/dashboard/.doommodule b/modules/ui/dashboard/.doommodule deleted file mode 100644 index e69de29bb2d..00000000000