diff options
author | mattkae <mattkae@protonmail.com> | 2023-01-15 10:58:59 -0500 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2023-01-15 10:58:59 -0500 |
commit | 46a02dead281282fc36192e073cf8e95d66c427a (patch) | |
tree | 7c7ac72f05d295ff8c0720d4278ddb95eed504af /lisp | |
parent | 048930df7fee2679ea61112b192100891ad8965f (diff) |
Using treemacs instead of neotree
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/general.el | 53 | ||||
-rw-r--r-- | lisp/text.el | 12 |
2 files changed, 28 insertions, 37 deletions
diff --git a/lisp/general.el b/lisp/general.el index 7092228..318b407 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -110,26 +110,18 @@ ) ;; Tree -(require 'neotree) -(setq neo-smart-open t) -(setq projectile-switch-project-action 'neotree-projectile-action) -(setq neo-theme (if (display-graphic-p) 'icons 'arrow)) -;; (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) -;; (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look) -;; (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) -;; (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) -;; (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh) -;; (evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line) -;; (evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line) -;; (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle) -;; (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle) -(defun my-neotree-mode-hook() - "Set the colors of neotree to match my personal taste." - (setq left-fringe-width 0) - (setq right-fringe-width 0) +(use-package treemacs + :ensure t + :config + (add-hook 'treemacs-mode-hook treemacs-filewatch-mode) + (add-hook 'treemacs-mode-hook treemacs-git-mode) ) -(add-hook 'neotree-mode-hook 'my-neotree-mode-hook) -(setq neo-window-width 36) + +(use-package treemacs-projectile + :ensure t + :after (treemacs projectile)) + +(setq projectile-switch-project-action 'treemacs-add-and-display-current-project-exclusively) ;; Line highlighting (global-hl-line-mode 1) @@ -174,16 +166,13 @@ (bind-key* (kbd "M-.") 'xref-find-definitions) (bind-key* (kbd "C-x k") 'kill-this-buffer) (bind-key* (kbd "C-x b") 'electric-buffer-list) -(bind-key* (kbd "C-;") 'neotree-toggle) +(bind-key* (kbd "C-;") 'treemacs) (defun my-create-file (filename) "Create a file and refresh neotree. FILENAME File to create." (interactive (list (read-file-name "Enter your file name: " nil nil nil (file-name-nondirectory "")))) (make-empty-file filename) - (find-file filename) - (neotree-show) - (neotree-refresh) - (other-window -1)) + (find-file filename)) (bind-key* (kbd "M-n") 'my-create-file) @@ -191,27 +180,19 @@ "Create a directory and refresh neotree." (interactive) (call-interactively #'make-directory) - (neotree-show) - (neotree-refresh) (other-window -1)) (bind-key* (kbd "M-N") 'my-create-directory) (defun my-delete-file () "Delete a file and refresh neotree." (interactive) - (call-interactively #'delete-file) - (neotree-show) - (neotree-refresh) - (other-window -1)) + (call-interactively #'delete-file)) (bind-key* (kbd "M-d") 'my-delete-file) (defun my-delete-directory () "Delete a file and refresh neotree." (interactive) - (call-interactively #'delete-directory) - (neotree-show) - (neotree-refresh) - (other-window -1)) + (call-interactively #'delete-directory)) (bind-key* (kbd "M-D") 'my-delete-directory) ;; source: http://steve.yegge.googlepages.com/my-dot-emacs-file @@ -229,8 +210,8 @@ (rename-buffer new-name) (set-visited-file-name new-name) (set-buffer-modified-p nil) - (neotree-show) - (neotree-refresh) + ;(neotree-show) + ;(neotree-refresh) (other-window -1)))))) (bind-key* (kbd "M-r") 'my-rename-file) diff --git a/lisp/text.el b/lisp/text.el index 6467a4e..835f04d 100644 --- a/lisp/text.el +++ b/lisp/text.el @@ -2,15 +2,25 @@ ;;; Code: (defun setup-text-mode () "Disable word wrap in text mode." + ;(perfect-margin-mode 1) (setq word-wrap t) (require 'flyspell) (flyspell-mode 1) -) + (set-face-attribute 'hl-line nil + :box nil) + (display-line-numbers-mode -1) + ) + +(use-package perfect-margin + :ensure t + :config + (add-hook 'text-mode-hook 'perfect-margin-mode)) (add-hook 'text-mode-hook 'setup-text-mode) (require 'ispell) (setq ispell-program-name (executable-find "hunspell") ispell-dictionary "en_US") + (provide 'text) ;;; text.el ends here |