From c1b882cd0cac5fd10a1065d2ad105dc89def3ca3 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 14 Dec 2023 09:25:46 +0000 Subject: [PATCH] Add treemacs with some sensible default config --- README.org | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/README.org b/README.org index 75edad4..8fa3649 100644 --- a/README.org +++ b/README.org @@ -359,6 +359,55 @@ Loading this file is handled automatically on my [[https://git.xenia.me.uk/xenia (diff-hl-disable-on-remote t) (diff-hl-draw-borders nil)) #+end_src + +** Treemacs +#+begin_src emacs-lisp + (use-package treemacs + :ensure t + :defer t + :config + ;; The default width and height of the icons is 22 pixels. If you are + ;; using a Hi-DPI display, uncomment this to double the icon size. + ;;(treemacs-resize-icons 44) + + (treemacs-follow-mode t) + (treemacs-filewatch-mode t) + (treemacs-fringe-indicator-mode 'always) + (when treemacs-python-executable + (treemacs-git-commit-diff-mode t)) + + (pcase (cons (not (null (executable-find "git"))) + (not (null treemacs-python-executable))) + (`(t . t) + (treemacs-git-mode 'deferred)) + (`(t . _) + (treemacs-git-mode 'simple))) + + (treemacs-hide-gitignored-files-mode nil) + :bind + ("M-0" . treemacs-select-window) + ("C-x t 1" . treemacs-delete-other-windows) + ("C-x t t" . treemacs) + ("C-x t d" . treemacs-select-directory) + ("C-x t B" . treemacs-bookmark) + ("C-x t C-t" . treemacs-find-file) + ("C-x t M-t" . treemacs-find-tag)) + + ;; (use-package treemacs-icons-dired + ;; :hook (dired-mode . treemacs-icons-dired-enable-once) + ;; :ensure t) + + (use-package treemacs-magit + :after (treemacs magit) + :ensure t) + + (use-package treemacs-nerd-icons + :after (treemacs nerd-icons) + :ensure t + :config + (treemacs-load-theme "nerd-icons")) +#+end_src + * Org-mode For reference information, see [[https://orgmode.com][Org-mode website]]