Add treemacs with some sensible default config

This commit is contained in:
Evie Litherland-Smith 2023-12-14 09:25:46 +00:00
parent 351830bbde
commit c1b882cd0c

View file

@ -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]]