dotfiles/.config/emacs/modules/projects/earnemod-treemacs.el

56 lines
1.3 KiB
EmacsLisp

;;; earnemod-treemacs.el --- Treemacs+Projectile -*- lexical-binding: t; -*-
;; Copyright (C) 2020-2021 earnest ma
;; SPDX-License-Identifier: MIT
;; Author: earnest ma <me@earne.link>
;;; Commentary:
;;
;;; Code:
(use-package treemacs
:init
;; Set persist file per session name
(setq treemacs-persist-file (concat no-littering-var-directory
"treemacs/persist-"
earnemacs-daemon-name ".el"))
:general
(earnemacs-spc-def
"op" 'treemacs)
:config
;; doom-themes + treemacs <3 (M-x all-the-icons-install-fonts)
(doom-themes-treemacs-config)
;; ?
(treemacs-fringe-indicator-mode 'only-when-focused)
;; Defer using git to check for modified files
(treemacs-git-mode 'deferred)
;; Auto-refresh when files change
(treemacs-filewatch-mode)
;; Follow the current file
(setq treemacs-follow-after-init t)
;; Set width of buffer
(setq treemacs-width 26)
;; Refresh without showing a message
(setq treemacs-silent-refresh t)
;; Do not show cursor in buffer
(setq treemacs-show-cursor nil))
(use-package treemacs-evil
:demand
:after treemacs)
(use-package treemacs-projectile
:demand
:after treemacs)
(provide 'earnemod-treemacs)
;;; earnemod-treemacs.el ends here