diff --git a/.gitignore b/.gitignore index 71d0490..2e23564 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,5 @@ flycheck_*.el transient/ eln-cache -.lsp-session-* \ No newline at end of file +.lsp-session-* +session.* \ No newline at end of file diff --git a/README.md b/README.md index 2172947..d45c92e 100644 --- a/README.md +++ b/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/). -## 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 diff --git a/elisp/custom.el b/elisp/custom.el index af57729..c99ebd1 100644 --- a/elisp/custom.el +++ b/elisp/custom.el @@ -4,7 +4,7 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(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 was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/elisp/keybinds.el b/elisp/keybinds.el index c031747..dcf115a 100644 --- a/elisp/keybinds.el +++ b/elisp/keybinds.el @@ -13,6 +13,9 @@ ;; Force C-x C-b to 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 ;; with larger projects. (global-set-key (kbd "C-x f") 'projectile--find-file) diff --git a/elisp/ui.el b/elisp/ui.el index c1455b9..9c464bb 100644 --- a/elisp/ui.el +++ b/elisp/ui.el @@ -45,16 +45,35 @@ :config (unless (member "all-the-icons" (font-family-list)) (all-the-icons-install-fonts t))) -;; Nice tree -(use-package neotree +;; Tree +(use-package treemacs :ensure t - :demand t - :commands neotree-toggle - :init (setq neo-theme (if (display-graphic-p) 'icons 'arrow)) + :defer t + :init + (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 - (setq neo-window-fixed-size nil) - :bind ("C-`" . neotree-toggle) - :requires all-the-icons) + (progn + (treemacs-load-theme "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 (use-package nord-theme diff --git a/emacs.png b/emacs.png index 3f167e6..86c7a53 100644 Binary files a/emacs.png and b/emacs.png differ