Created
June 9, 2018 14:21
-
-
Save kreedz/619a0d2f0ee637aac717d71a17dc275d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; list the packages you want | |
(setq package-list | |
'(treemacs)) | |
;; list the repositories containing them | |
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") | |
("marmalade" . "https://marmalade-repo.org/packages/") | |
("melpa" . "https://melpa.org/packages/"))) | |
;; activate all the packages (in particular autoloads) | |
(package-initialize) | |
;; fetch the list of packages available | |
(unless package-archive-contents | |
(package-refresh-contents)) | |
;; install the missing packages | |
(dolist (package package-list) | |
(unless (package-installed-p package) | |
(package-install package))) | |
;; treemacs | |
(global-set-key (kbd "M-0") 'treemacs-select-window) | |
(global-set-key (kbd "C-x t 1") 'treemacs-delete-other-windows) | |
(global-set-key (kbd "C-x t t") 'treemacs) | |
(global-set-key (kbd "C-x t B") 'treemacs-bookmark) | |
(global-set-key (kbd "C-x t C-t") 'treemacs-find-file) | |
(global-set-key (kbd "C-x t M-t") 'treemacs-find-tag) | |
(with-eval-after-load 'treemacs | |
(setq treemacs-collapse-dirs (if (executable-find "python") 3 0) | |
treemacs-file-event-delay 5000 | |
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-recenter-after-file-follow nil | |
treemacs-recenter-after-tag-follow nil | |
treemacs-show-hidden-files t | |
treemacs-silent-filewatch nil | |
treemacs-silent-refresh nil | |
treemacs-sorting 'alphabetic-desc | |
treemacs-tag-follow-cleanup t | |
treemacs-tag-follow-delay 1.5 | |
treemacs-width 35) | |
(treemacs-follow-mode t) | |
(treemacs-filewatch-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)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment