this repo has no description
dotfiles

Improve display in org-roam node search

Aliases will now point to their actual node name.

Code adapted from
https://gist.github.com/chunglak/d39636cc8164e5101286b821c468f65a

+19
+2
doom/.config/doom/config.el
··· 142 142 (advice-remove 'org-tree-slide--display-tree-with-narrow 143 143 #'+org-present--hide-first-heading-maybe-a)) 144 144 145 + (load! "hacks/org-roam-alias-display.el") 146 + 145 147 ;; Whenever you reconfigure a package, make sure to wrap your config in an 146 148 ;; `after!' block, otherwise Doom's defaults may override your settings. E.g. 147 149 ;;
+17
doom/.config/doom/hacks/org-roam-alias-display.el
··· 1 + ;;; $DOOMDIR/hacks/org-roam-alias-display.el -*- lexical-binding: t; -*- 2 + 3 + (after! org-roam 4 + (cl-defmethod org-roam-node-orig-pointer ((node org-roam-node)) 5 + (let* ((title (org-roam-node-title node)) 6 + (props (org-roam-node-properties node)) 7 + (aliases0 (cdr (assoc "ROAM_ALIASES" props))) 8 + (aliases (if aliases0 (split-string-and-unquote aliases0) nil))) 9 + (if (and aliases (listp aliases) (member title aliases)) 10 + (let ((item (cdr (assoc "ITEM" props)))) 11 + (format "→ %s" (if item item (org-roam-node-file-title node)))) 12 + ""))) 13 + 14 + (setq org-roam-node-display-template 15 + (format "${doom-hierarchy:*} ${orig-pointer:30} %s %s" 16 + (propertize "${doom-type:12}" 'face 'font-lock-keyword-face) 17 + (propertize "${doom-tags:42}" 'face 'org-tag))))