confi-emacs-actual/configs/init-treemacs.el

61 lines
1.8 KiB
EmacsLisp
Raw Normal View History

2022-11-19 04:33:22 +01:00
;;; init-treemacs.el --- Extensiones/paquetes instalados y su configuración -*- lexical-binding: t -*-
2022-06-09 09:53:59 +02:00
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;;; Code:
(use-package treemacs
:defer t
:straight t
:commands (treemacs-follow-mode
treemacs-filewatch-mode
treemacs-fringe-indicator-mode
treemacs-git-mode)
:custom-face
(cfrs-border-color ((t (:background ,(face-foreground 'font-lock-comment-face nil t)))))
:bind (([f9] . treemacs)
([f8] . treemacs-display-current-project-exclusively)
("C-x t 1" . treemacs-delete-other-windows)
("C-x t b" . treemacs-bookmark)
:map treemacs-mode-map
([mouse-1] . treemacs-single-click-expand-action))
:config
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
treemacs-missing-project-action 'remove
treemacs-sorting 'alphabetic-asc
treemacs-follow-after-init t
treemacs-width 30)
:config
(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 'deferred))
(`(t . _)
(treemacs-git-mode 'simple))))
(use-package treemacs-projectile
:defer t
:straight t
:after projectile
:bind (:map projectile-command-map
("h" . treemacs-projectile)))
(use-package treemacs-magit
:defer t
:straight t
2022-06-09 09:53:59 +02:00
:after magit
:commands treemacs-magit--schedule-update
:hook ((magit-post-commit
git-commit-post-finish
magit-post-stage
magit-post-unstage)
. treemacs-magit--schedule-update))
2022-11-19 04:33:22 +01:00
(provide 'init-treemacs)
;;; init-treemacs.el ends here