From 990d8e52f7c8e8c5c925fe960f3c62be2395a5bc Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 10 Feb 2025 15:18:13 +0000 Subject: [PATCH] Add nerd-icons-completion, remove poke-line and dashboard Customise org-roam-node-display-template to show hierarchy of node Simplify custom theme hook setting --- init.el | 73 ++++++++++++++++++++------------------------------------- 1 file changed, 25 insertions(+), 48 deletions(-) diff --git a/init.el b/init.el index 3865c3b..e16a86a 100644 --- a/init.el +++ b/init.el @@ -83,18 +83,30 @@ (use-package nerd-icons :if (package-installed-p 'nerd-icons) - :functions (nerd-icons-octicon)) + :functions (nerd-icons-octicon) + :demand t) + +(use-package nerd-icons-completion + :if (package-installed-p 'nerd-icons-completion) + :after nerd-icons + :functions (nerd-icons-completion-mode + nerd-icons-completion-marginalia-setup) + :init + (nerd-icons-completion-mode +1) + :config + (with-eval-after-load 'marginalia + (add-hook 'marginalia-mode-hook #'nerd-icons-completion-marginalia-setup))) (use-package nerd-icons-dired :if (package-installed-p 'nerd-icons-dired) :after (nerd-icons dired) - :commands nerd-icons-dired-mode + :functions nerd-icons-dired-mode :hook (dired-mode . (lambda () (nerd-icons-dired-mode +1)))) (use-package nerd-icons-ibuffer :if (package-installed-p 'nerd-icons-ibuffer) :after nerd-icons - :commands nerd-icons-ibuffer-mode + :functions nerd-icons-ibuffer-mode :hook (ibuffer-mode . (lambda () (nerd-icons-ibuffer-mode +1)))) (use-package nerd-icons-corfu @@ -127,39 +139,6 @@ :custom (which-func-modes '(prog-mode))) -(use-package poke-line - :if (package-installed-p 'poke-line) - :functions (poke-line-global-mode) - :custom - (poke-line-pokemon "rotom") - :init - (line-number-mode -1) - (column-number-mode -1) - (size-indication-mode -1) - (poke-line-global-mode +1)) - -(use-package dashboard - :if (package-installed-p 'dashboard) - :demand t - :functions (dashboard-setup-startup-hook) - :config - (dashboard-setup-startup-hook) - :custom - (dashboard-center-content t) - (dashboard-vertical-center-content t) - (dashboard-show-shortcuts t) - (dashboard-set-init-info t) - (dashboard-icon-type 'nerd-icons) - (dashboard-set-file-icons t) - (dashboard-set-heading-icons t) - (dashboard-projects-backend 'project-el) - (dashboard-items '((projects . 20))) - (dashboard-heading-icons '((recents . "nf-oct-history") - (bookmarks . "nf-oct-bookmark") - (agenda . "nf-oct-calendar") - (projects . "nf-oct-rocket") - (registers . "nf-oct-database")))) - (use-package olivetti :if (package-installed-p 'olivetti) :hook (text-mode) @@ -665,13 +644,13 @@ ("C-c n l" . org-roam-buffer-toggle)) :custom (org-roam-directory (expand-file-name "roam" org-directory)) - (org-roam-completion-everywhere nil) + (org-roam-extract-new-file-path "${slug}.org") + (org-roam-completion-everywhere t) (org-roam-node-display-template (concat - "${title:*} " - (propertize "${tags:24}" 'face 'org-tag))) - (org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${slug}.org" "#+title: ${title}\n") - :unnarrowed t))) + (propertize "${file}" 'face 'dired-directory) + (propertize ":${olp}:" 'face 'org-roam-olp) + (propertize "${title}" 'face 'org-roam-title) + (propertize " ${tags} " 'face 'org-roam-header-line))) :config (mkdir org-roam-directory t) (add-to-list 'display-buffer-alist @@ -866,13 +845,14 @@ (use-package marginalia :if (package-installed-p 'marginalia) :functions marginalia-mode + :bind ( :map minibuffer-local-map + ("M-A" . marginalia-cycle)) :custom (marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil)) :init - (marginalia-mode +1) - :config (marginalia-mode +1)) + (marginalia-mode +1)) (use-package orderless :if (package-installed-p 'orderless) @@ -1334,11 +1314,8 @@ (set-face-attribute 'org-noter-notes-exist-face nil :foreground (plist-get base16-stylix-theme-colors :base0B)))) ) - (with-eval-after-load 'base16-theme - (require 'server) - (add-hook 'after-init-hook (lambda () (my/configure-theme))) - (add-hook 'server-after-make-frame-hook (lambda () (my/configure-theme)))) + (add-hook 'after-init-hook #'my/configure-theme)) (provide 'init) ;;; init.el ends here