summaryrefslogtreecommitdiff
path: root/config/treemacs.el
diff options
context:
space:
mode:
authorbh <qn+git@excalibur.computer>2025-12-12 20:59:09 +0800
committerbh <qn+git@excalibur.computer>2025-12-12 20:59:09 +0800
commit77cfedd1c9a6173cc8b47fb97eb594ef3186c264 (patch)
treea8219eec8022cb15af3d3d95c225b82f72285259 /config/treemacs.el
parentf5e40c74da77adf875dea03c0a120ea64d7a58d4 (diff)
Removed unnecessary files from git tracking and added magit to config
Diffstat (limited to 'config/treemacs.el')
-rw-r--r--config/treemacs.el55
1 files changed, 33 insertions, 22 deletions
diff --git a/config/treemacs.el b/config/treemacs.el
index 07ecb41..e6acc95 100644
--- a/config/treemacs.el
+++ b/config/treemacs.el
@@ -4,32 +4,43 @@
:defer t
:config
(setq treemacs-width 35
- treemacs-width-is-initially-locked nil ;; Allow resizing
- treemacs-width-increment 1 ;; Smooth resize
- treemacs-position 'left
- treemacs-show-hidden-files t
- ; treemacs-indentation 1 ;; Minimal indentation
- ; treemacs-indentation-string " " ;; Just space, no lines
+ treemacs-width-is-initially-locked nil ;; Allow resizing
+ treemacs-width-increment 1 ;; Smooth resize
+ treemacs-position 'left
+ treemacs-show-hidden-files t
+ ; treemacs-indentation 1 ;; Minimal indentation
+ ; treemacs-indentation-string " " ;; Just space, no lines
- ;; Disable mouse Features
- treemacs-move-files-by-mouse-dragging nil ;; NO DRAGGING FILES!
- treemacs-recenter-after-file-follow nil ;; Prevent mouse issues
- treemacs-silent-filewatch t ;; Reduce mouse events
- treemacs-show-cursor nil) ;; Hide cursor in treemacs
+ ;; Disable mouse Features
+ treemacs-move-files-by-mouse-dragging nil ;; NO DRAGGING FILES!
+ treemacs-recenter-after-file-follow nil ;; Prevent mouse issues
+ treemacs-silent-filewatch t ;; Reduce mouse events
+ treemacs-show-cursor nil) ;; Hide cursor in treemacs
;; Disable mouse in treemacs completely
:hook
(treemacs-mode . (lambda ()
- ;; Disable all mouse button bindings
- (define-key treemacs-mode-map [mouse-1] 'ignore)
- (define-key treemacs-mode-map [mouse-2] 'ignore)
- (define-key treemacs-mode-map [mouse-3] 'ignore)
- (define-key treemacs-mode-map [drag-mouse-1] 'ignore)
- (define-key treemacs-mode-map [down-mouse-1] 'ignore)
- (define-key treemacs-mode-map [double-mouse-1] 'ignore)
- (define-key treemacs-mode-map [triple-mouse-1] 'ignore)))
+ ;; Disable all mouse button bindings
+ (define-key treemacs-mode-map [mouse-1] 'ignore)
+ (define-key treemacs-mode-map [mouse-2] 'ignore)
+ (define-key treemacs-mode-map [mouse-3] 'ignore)
+ (define-key treemacs-mode-map [drag-mouse-1] 'ignore)
+ (define-key treemacs-mode-map [down-mouse-1] 'ignore)
+ (define-key treemacs-mode-map [double-mouse-1] 'ignore)
+ (define-key treemacs-mode-map [triple-mouse-1] 'ignore)))
:bind
- ("C-x t t" . treemacs))
+ (:map global-map
+ ("M-0" . treemacs-select-window)
+ ("C-x t 1" . treemacs-delete-other-windows)
+ ("C-x t t" . treemacs)
+ ("C-x t d" . treemacs-select-directory)
+ ("C-x t B" . treemacs-bookmark)
+ ("C-x t C-t" . treemacs-find-file)
+ ("C-x t M-t" . treemacs-find-tag)))
+
+;; Evil keybindings for treemacs
+(use-package treemacs-evil
+ :after (treemacs evil))
;; Beautiful icons for treemacs using nerd-icons
(use-package treemacs-nerd-icons
@@ -42,5 +53,5 @@
;; Customize folder icon colors (for nerd-icons theme)
(with-eval-after-load 'treemacs-nerd-icons
(set-face-attribute 'treemacs-nerd-icons-file-face nil
- :foreground "#74c4c4"
- :inherit 'unspecified))
+ :foreground "#74c4c4"
+ :inherit 'unspecified))