Emacs: redefined treemacs config

This commit is contained in:
Marcel Kapfer 2018-08-03 09:21:51 +02:00
parent ad20a6145f
commit f0a248c476
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -548,44 +548,29 @@
;; A tree style file explorer package ;; A tree style file explorer package
(use-package treemacs (use-package treemacs
:init :init
(define-prefix-command 'treemacs-map) (with-eval-after-load 'winum
(global-set-key (kbd "M-m") 'treemacs-map) (define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
:config :config
(setq treemacs-follow-after-init t (setq treemacs-is-never-other-window t
treemacs-width 35 treemacs-project-follow-cleanup t
treemacs-indentation 2 treemacs-python-executable (executable-find "python3")
treemacs-git-integration t treemacs-recenter-after-file-follow t)
treemacs-collapse-dirs (if (executable-find "python") 3 0)
treemacs-silent-refresh nil
treemacs-change-root-without-asking nil
treemacs-sorting 'alphabetic-desc
treemacs-show-hidden-files t
treemacs-never-persist nil
treemacs-is-never-other-window nil
treemacs-goto-tag-strategy 'refetch-index)
(treemacs-follow-mode t) (treemacs-follow-mode t)
(treemacs-filewatch-mode t) (treemacs-git-mode 'extended)
(treemacs-filewatch-mode)
:bind :bind
(:map global-map (:map global-map
("<f9>" . treemacs-toggle)
("M-0" . treemacs-select-window) ("M-0" . treemacs-select-window)
("C-c 1" . treemacs-delete-other-windows) ("C-x t 1" . treemacs-delete-other-window)
("M-m ft" . treemacs-toggle) ("C-x t t" . treemacs)
("M-m fT" . treemacs) ("C-x t B" . treemacs-bookmark)
("M-m fB" . treemacs-bookmark) ("C-x t C-t" . treemacs-find-file)
("M-m f C-t" . treemacs-find-file) ("C-x t M-t" . treemacs-find-tag)))
("M-m f M-t" . treemacs-find-tag)))
;; treemacs-projectile ;; treemacs-projectile
;; Projectile integration for treemacs ;; Projectile integration for treemacs
(use-package treemacs-projectile (use-package treemacs-projectile
:after treemacs :after treemacs projectile)
:config
(setq treemacs-header-function #'treemacs-projectile-create-header)
:bind
(:map global-map
("M-m fP" . treemacs-projectile)
("M-m fp" . treemacs-projectile-toggle)))
;; magit ;; magit
;; A Git porcelain inside Emacs ;; A Git porcelain inside Emacs