From 93df45d71180c529de7c3be253bf5f1348f376d0 Mon Sep 17 00:00:00 2001 From: Emmet Date: Sat, 2 Sep 2023 21:20:59 -0500 Subject: [PATCH] Neotree and treemacs-symbols are helpful --- user/app/doom-emacs/config.el | 24 ++++++++++++++++++++++++ user/app/doom-emacs/doom.org | 25 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index bccf279..85e581b 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -161,6 +161,17 @@ (setq global-auto-revert-mode nil) (setq auto-revert-use-notify t) +(defun neotree-snipe-dir () + (interactive) + (if (projectile-project-root) + (neotree-dir (projectile-project-root)) + (neotree-dir (file-name-directory (file-truename (buffer-name)))) + ) +) + +(map! :leader :desc "Open neotree here" "o n" #'neotree-snipe-dir + :desc "Hide neotree" "o N" #'neotree-hide) + ;;;------ Registers ------;;; (map! :leader @@ -1100,4 +1111,17 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)." :hook (gdscript-mode . lsp-deferred) :ensure t) +(setq lsp-treemacs-deps-position-params + '((side . right) + (slot . 1) + (window-width . 35))) + +(setq lsp-treemacs-symbols-position-params +'((side . right) + (slot . 2) + (window-width . 35))) + +(map! :leader :desc "Open treemacs symbol outliner" "o s" #'lsp-treemacs-symbols + :desc "Hide neotree" "o S" #'treemacs-quit) + diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 436258b..c7d5ccd 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -222,6 +222,17 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu (setq global-auto-revert-mode nil) (setq auto-revert-use-notify t) +(defun neotree-snipe-dir () + (interactive) + (if (projectile-project-root) + (neotree-dir (projectile-project-root)) + (neotree-dir (file-name-directory (file-truename (buffer-name)))) + ) +) + +(map! :leader :desc "Open neotree here" "o n" #'neotree-snipe-dir + :desc "Hide neotree" "o N" #'neotree-hide) + #+END_SRC ** Registers #+BEGIN_SRC emacs-lisp :tangle config.el @@ -1339,6 +1350,20 @@ EAF doesn't work on Wayland :( (use-package gdscript-mode :hook (gdscript-mode . lsp-deferred) :ensure t) + +(setq lsp-treemacs-deps-position-params + '((side . right) + (slot . 1) + (window-width . 35))) + +(setq lsp-treemacs-symbols-position-params +'((side . right) + (slot . 2) + (window-width . 35))) + +(map! :leader :desc "Open treemacs symbol outliner" "o s" #'lsp-treemacs-symbols + :desc "Hide neotree" "o S" #'treemacs-quit) + #+END_SRC ** Terminal #+BEGIN_SRC emacs-lisp :tangle config.el