doomemacs/modules/ui/treemacs/config.el
Henrik Lissner 76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00

48 lines
1.2 KiB
EmacsLisp

;;; ui/treemacs/config.el -*- lexical-binding: t; -*-
(setq treemacs-follow-after-init t
treemacs-is-never-other-window t
treemacs-sorting 'alphabetic-case-insensitive-desc
treemacs-persist-file (concat doom-cache-dir "treemacs-persist")
treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist"))
(after! treemacs-persistence
;; This variable is defined with defconst, so we must wait to change it until
;; it has loaded.
(setq treemacs--last-error-persist-file
(concat doom-cache-dir
"treemacs-persist-at-last-error")))
(after! treemacs
(set-popup-rule! "^ \\*Treemacs"
:side treemacs-position
:size treemacs-width
:quit nil
:ttl 0)
;; Don't follow the cursor
(treemacs-follow-mode -1)
(after! ace-window
(delq! 'treemacs-mode aw-ignored-buffers)))
(use-package! treemacs-evil
:when (featurep! :editor evil +everywhere)
:after treemacs
:config
(define-key! evil-treemacs-state-map
[return] #'treemacs-RET-action
[tab] #'treemacs-TAB-action
"TAB" #'treemacs-TAB-action))
(use-package! treemacs-projectile
:after treemacs)
(use-package! treemacs-magit
:when (featurep! :tools magit)
:after treemacs magit)