mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 20:10:23 +10:00
Updating Doom Emacs.
This commit is contained in:
@@ -1,25 +1,48 @@
|
||||
;;; ui/treemacs/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(setq treemacs-follow-after-init t
|
||||
treemacs-is-never-other-window t
|
||||
treemacs-sorting 'alphabetic-case-insensitive-asc
|
||||
treemacs-persist-file (concat doom-cache-dir "treemacs-persist")
|
||||
treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist"))
|
||||
(defvar +treemacs-git-mode 'simple
|
||||
"Type of git integration for `treemacs-git-mode'.
|
||||
|
||||
There are 3 possible values:
|
||||
|
||||
1) `simple', which highlights only files based on their git status, and is
|
||||
slightly faster,
|
||||
2) `extended', which highlights both files and directories, but requires
|
||||
python,
|
||||
3) `deferred', same as extended, but highlights asynchronously.
|
||||
|
||||
This must be set before `treemacs' has loaded.")
|
||||
|
||||
|
||||
(after! treemacs
|
||||
(set-popup-rule! "^ \\*Treemacs"
|
||||
:side treemacs-position
|
||||
:size treemacs-width
|
||||
:quit nil
|
||||
:ttl 0)
|
||||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! treemacs
|
||||
:defer t
|
||||
:init
|
||||
(setq treemacs-follow-after-init t
|
||||
treemacs-is-never-other-window t
|
||||
treemacs-sorting 'alphabetic-case-insensitive-asc
|
||||
treemacs-persist-file (concat doom-cache-dir "treemacs-persist")
|
||||
treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist"))
|
||||
:config
|
||||
;; Allow ace-window to target treemacs windows
|
||||
(after! ace-window
|
||||
(delq! 'treemacs-mode aw-ignored-buffers))
|
||||
|
||||
;; Don't follow the cursor
|
||||
(treemacs-follow-mode -1)
|
||||
|
||||
;; Allow ace-window to target treemacs windows
|
||||
(after! ace-window
|
||||
(delq! 'treemacs-mode aw-ignored-buffers)))
|
||||
(when +treemacs-git-mode
|
||||
;; If they aren't supported, fall back to simpler methods
|
||||
(when (and (memq +treemacs-git-mode '(deferred extended))
|
||||
(not (executable-find "python3")))
|
||||
(setq +treemacs-git-mode 'simple))
|
||||
(treemacs-git-mode +treemacs-git-mode)
|
||||
(setq treemacs-collapse-dirs
|
||||
(if (memq treemacs-git-mode '(extended deferred))
|
||||
3
|
||||
0))))
|
||||
|
||||
|
||||
(use-package! treemacs-evil
|
||||
@@ -43,3 +66,9 @@
|
||||
(use-package! treemacs-magit
|
||||
:when (featurep! :tools magit)
|
||||
:after treemacs magit)
|
||||
|
||||
|
||||
(use-package! treemacs-persp
|
||||
:when (featurep! :ui workspaces)
|
||||
:after treemacs
|
||||
:config (treemacs-set-scope-type 'Perspectives))
|
||||
|
||||
Reference in New Issue
Block a user