diff --git a/home/emacs/init.el b/home/emacs/init.el index 6212f880..873e7e6d 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -325,8 +325,50 @@ citar-symbols '((file "F" . "󰂺") (note "N" . "󰎞") (link "L" . "󰌹"))) -(when (require 'citar nil :noerror) - (keymap-global-set "C-c o c o" #'citar-open)) + +(use-package citar + :ensure t + :bind (("C-c o c o" . citar-open)) + :config + (defvar citar-indicator-files-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-file" + :face 'nerd-icons-green + :v-adjust -0.1) + :function #'citar-has-files + :padding " " ; need this because the default padding is too low for these icons + :tag "has:files")) + (defvar citar-indicator-links-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-link" + :face 'nerd-icons-orange + :v-adjust 0.01) + :function #'citar-has-links + :padding " " + :tag "has:links")) + (defvar citar-indicator-notes-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-note" + :face 'nerd-icons-blue + :v-adjust -0.3) + :function #'citar-has-notes + :padding " " + :tag "has:notes")) + (defvar citar-indicator-cited-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-circle" + :face 'nerd-icon-green) + :function #'citar-is-cited + :padding " " + :tag "is:cited")) + (setq citar-indicators (list citar-indicator-files-icons + citar-indicator-links-icons + citar-indicator-notes-icons + citar-indicator-cited-icons))) (setq khalel-import-org-file (expand-file-name "calendar.org" org-directory) khalel-import-org-file-read-only nil diff --git a/home/emacs/init.org b/home/emacs/init.org index a19893cb..510b5f41 100644 --- a/home/emacs/init.org +++ b/home/emacs/init.org @@ -381,8 +381,50 @@ For reference information, see [[https://orgmode.com][Org-mode website]] citar-symbols '((file "F" . "󰂺") (note "N" . "󰎞") (link "L" . "󰌹"))) - (when (require 'citar nil :noerror) - (keymap-global-set "C-c o c o" #'citar-open)) + + (use-package citar + :ensure t + :bind (("C-c o c o" . citar-open)) + :config + (defvar citar-indicator-files-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-file" + :face 'nerd-icons-green + :v-adjust -0.1) + :function #'citar-has-files + :padding " " ; need this because the default padding is too low for these icons + :tag "has:files")) + (defvar citar-indicator-links-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-link" + :face 'nerd-icons-orange + :v-adjust 0.01) + :function #'citar-has-links + :padding " " + :tag "has:links")) + (defvar citar-indicator-notes-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-note" + :face 'nerd-icons-blue + :v-adjust -0.3) + :function #'citar-has-notes + :padding " " + :tag "has:notes")) + (defvar citar-indicator-cited-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-circle" + :face 'nerd-icon-green) + :function #'citar-is-cited + :padding " " + :tag "is:cited")) + (setq citar-indicators (list citar-indicator-files-icons + citar-indicator-links-icons + citar-indicator-notes-icons + citar-indicator-cited-icons))) #+end_src ** Khalel