[treemacs] Use deferred git-mode by default.

This commit is contained in:
Alexander Miller 2018-12-18 19:10:16 +01:00 committed by Codruț Constantin Gușoi
parent 7353d5670f
commit 3cf322943a
2 changed files with 5 additions and 3 deletions

View file

@ -22,13 +22,15 @@ Must be a number.")
(defvar treemacs-use-git-mode (defvar treemacs-use-git-mode
(pcase (cons (not (null (executable-find "git"))) (pcase (cons (not (null (executable-find "git")))
(not (null (executable-find "python3")))) (not (null (executable-find "python3"))))
(`(t . t) 'extended) (`(t . t) 'deferred)
(`(t . _) 'simple)) (`(t . _) 'simple))
"Type of git integration for `treemacs-git-mode'. "Type of git integration for `treemacs-git-mode'.
There are 2 possible values: There are 2 possible values:
1) simple, which highlights only files based on their git status, and is 1) simple, which highlights only files based on their git status, and is
slightly faster slightly faster
2) extended, which highlights both files and directories, but requires python") 2) extended, which highlights both files and directories, but requires python
3) deferred, which is the same is extended, but delays highlighting for improved
performance")
(defvar treemacs-lock-width nil (defvar treemacs-lock-width nil
"When non-nil the treemacs window will not be manually resizable by default.") "When non-nil the treemacs window will not be manually resizable by default.")

View file

@ -66,7 +66,7 @@
(treemacs-follow-mode t)) (treemacs-follow-mode t))
(when treemacs-use-filewatch-mode (when treemacs-use-filewatch-mode
(treemacs-filewatch-mode t)) (treemacs-filewatch-mode t))
(when (memq treemacs-use-git-mode '(simple extended)) (when (memq treemacs-use-git-mode '(simple extended deferred))
(treemacs-git-mode treemacs-use-git-mode)) (treemacs-git-mode treemacs-use-git-mode))
(add-to-list 'spacemacs-window-split-ignore-prefixes (add-to-list 'spacemacs-window-split-ignore-prefixes
treemacs--buffer-name-prefix)))) treemacs--buffer-name-prefix))))