[treemacs] Check for git and python 3 upstream

problem:
The Treemacs layer is unable to find python 3 in Windows.

cause:
The Treemacs layer looks for "python3", but the executable is called
"python.exe" in Windows.

solution:
Let Treemacs check for python 3 upstream, it has a better method for finding the
python 3 executable in Windows.
This commit is contained in:
duianto 2020-12-30 14:02:50 +01:00 committed by Maximilian Wolff
parent b2f014107f
commit 5281c3a17b

View file

@ -21,13 +21,9 @@ Possible values are:
- `Frames' - to scope treemacs to the current frame - `Frames' - to scope treemacs to the current frame
- `Perspectives' - to scope treemacs in conjunction with `persp-mode'.") - `Perspectives' - to scope treemacs in conjunction with `persp-mode'.")
(defvar treemacs-use-git-mode (defvar treemacs-use-git-mode nil
(pcase (cons (not (null (executable-find "git")))
(not (null (executable-find "python3"))))
(`(t . t) 'deferred)
(`(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 3 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