Browse Source

Replace Neotree with Treemacs.

master
Taylor Bockman 2 years ago
parent
commit
a0a9217c96
  1. 3
      .gitignore
  2. 4
      README.md
  3. 2
      elisp/custom.el
  4. 3
      elisp/keybinds.el
  5. 35
      elisp/ui.el
  6. BIN
      emacs.png

3
.gitignore vendored

@ -52,4 +52,5 @@ flycheck_*.el
transient/ transient/
eln-cache eln-cache
.lsp-session-* .lsp-session-*
session.*

4
README.md

@ -51,9 +51,9 @@ The current configuration is set to use multimarkdown. You may wish to install i
`magit` is installed. [Learn to use it](https://emacsair.me/2017/09/01/magit-walk-through/). `magit` is installed. [Learn to use it](https://emacsair.me/2017/09/01/magit-walk-through/).
## Neotree ## Treemacs
A nice tree is provided (with icons) by `Neotree`. You can toggle the tree by using ``C-``` A nice project/tree addin that works similar to eclipse. Launch using `M-t`. Mouse navigation support is enabled.
## Project Management ## Project Management

2
elisp/custom.el

@ -4,7 +4,7 @@
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(package-selected-packages '(package-selected-packages
'(company-lsp color-identifiers-mode centaur-tabs lsp-pyright magit doom-modeline flycheck-indicator nord-theme powerline rainbow-delimiters python-pytest json-mode company-jedi jedi hl-defined counsel rainbow-identifiers exwm-config all-the-icons-ibuffer slime ivy zerodark-theme zerodark neotree all-the-icons paredit flycheck aggressive-indent aggressive-indent-mode lsp-python-ms py-autopep8 pyenv-mode elpy lsp-ui use-package))) '(treemacs-all-the-icons treemacs-magit treemacs-icons-dired treemacs-projectile treemacs company-lsp color-identifiers-mode centaur-tabs lsp-pyright magit doom-modeline flycheck-indicator nord-theme powerline rainbow-delimiters python-pytest json-mode company-jedi jedi hl-defined counsel rainbow-identifiers exwm-config all-the-icons-ibuffer slime ivy zerodark-theme zerodark neotree all-the-icons paredit flycheck aggressive-indent aggressive-indent-mode lsp-python-ms py-autopep8 pyenv-mode elpy lsp-ui use-package)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

3
elisp/keybinds.el

@ -13,6 +13,9 @@
;; Force C-x C-b to ibuffer ;; Force C-x C-b to ibuffer
(global-set-key (kbd "C-x C-b") 'ibuffer) (global-set-key (kbd "C-x C-b") 'ibuffer)
;; Treemacs (will start new project if none exists)
(global-set-key (kbd "M-t") 'treemacs)
;; Use projectile find file to help ;; Use projectile find file to help
;; with larger projects. ;; with larger projects.
(global-set-key (kbd "C-x f") 'projectile--find-file) (global-set-key (kbd "C-x f") 'projectile--find-file)

35
elisp/ui.el

@ -45,16 +45,35 @@
:config (unless (member "all-the-icons" (font-family-list)) :config (unless (member "all-the-icons" (font-family-list))
(all-the-icons-install-fonts t))) (all-the-icons-install-fonts t)))
;; Nice tree ;; Tree
(use-package neotree (use-package treemacs
:ensure t :ensure t
:demand t :defer t
:commands neotree-toggle :init
:init (setq neo-theme (if (display-graphic-p) 'icons 'arrow)) (with-eval-after-load 'winum
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
(with-eval-after-load 'treemacs
(define-key treemacs-mode-map [mouse-1] #'treemacs-single-click-expand-action))
:config :config
(setq neo-window-fixed-size nil) (progn
:bind ("C-`" . neotree-toggle) (treemacs-load-theme "all-the-icons")
:requires all-the-icons) (setq treemacs-indent-guide-mode "line")))
(use-package treemacs-projectile
:after (treemacs projectile)
:ensure t)
(use-package treemacs-icons-dired
:hook (dired-mode . treemacs-icons-dired-enable-once)
:ensure t)
(use-package treemacs-magit
:after (treemacs magit)
:ensure t)
(use-package treemacs-all-the-icons
:after (all-the-icons treemacs)
:ensure t)
;; Theme ;; Theme
(use-package nord-theme (use-package nord-theme

BIN
emacs.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 339 KiB

Loading…
Cancel
Save