-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtreemacs-init.el
91 lines (84 loc) · 3.21 KB
/
treemacs-init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
(use-package treemacs
;; :ensure t
:defer 10
:init
(with-eval-after-load 'winum
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
:config
(progn
(setq treemacs-collapse-dirs (if (executable-find "python") 3 0)
treemacs-deferred-git-apply-delay 0.5
treemacs-display-in-side-window t
treemacs-file-event-delay 5000
treemacs-file-follow-delay 0.2
treemacs-follow-after-init t
treemacs-follow-recenter-distance 0.1
treemacs-goto-tag-strategy 'refetch-index
treemacs-indentation 2
treemacs-indentation-string " "
treemacs-is-never-other-window nil
treemacs-no-png-images nil
treemacs-project-follow-cleanup nil
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
treemacs-recenter-after-file-follow nil
treemacs-recenter-after-tag-follow nil
treemacs-recenter-after-project-jump 'always
treemacs-recenter-after-project-expand 'on-distance
treemacs-show-hidden-files t
treemacs-silent-filewatch nil
treemacs-silent-refresh nil
treemacs-sorting 'alphabetic-desc
treemacs-space-between-root-nodes t
treemacs-tag-follow-cleanup t
treemacs-tag-follow-delay 1.5
treemacs-position 'left
treemacs-user-mode-line-format nil
treemacs-width 60)
;; 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 t)
(pcase (cons (not (null (executable-find "git")))
(not (null (executable-find "python3"))))
(`(t . t)
(treemacs-git-mode 'extended))
(`(t . _)
(treemacs-git-mode 'simple))))
(global-set-key (kbd "S-<f8>") 'treemacs)
(global-set-key (kbd "A-0") 'treemacs-select-window)
:bind
(:map global-map
("A-t 0" . treemacs-select-window)
("A-t 1" . treemacs-delete-other-windows)
("A-t t" . treemacs)
;; ("S-f8" . treemacs)
("A-t B" . treemacs-bookmark)
("A-t C-t" . treemacs-find-file)
("A-t M-t" . treemacs-find-tag)
))
(use-package treemacs-evil
:after (treemacs evil)
;;:ensure t
)
(use-package treemacs-projectile
:after (treemacs projectile)
;; :ensure nil
:config
(setq treemacs-header-function #'treemacs-projectile-create-header)
:bind (([M-f8] . treemacs-projectile)
:map projectile-command-map
("h" . treemacs-projectile)))
(use-package treemacs-icons-dired
:after (treemacs dired)
;; :ensure t
:config (treemacs-icons-dired-mode))
(use-package treemacs-magit
:after (treemacs magit)
;;:ensure t
)
(use-package treemacs-persp
:after (treemacs persp-mode)
;;:ensure t
:config (treemacs-set-scope-type 'Perspectives))