Neotree and treemacs-symbols are helpful

This commit is contained in:
Emmet 2023-09-02 21:20:59 -05:00
parent a0305a2246
commit 93df45d711
2 changed files with 49 additions and 0 deletions

View file

@ -161,6 +161,17 @@
(setq global-auto-revert-mode nil) (setq global-auto-revert-mode nil)
(setq auto-revert-use-notify t) (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 ------;;; ;;;------ Registers ------;;;
(map! :leader (map! :leader
@ -1100,4 +1111,17 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
:hook (gdscript-mode . lsp-deferred) :hook (gdscript-mode . lsp-deferred)
:ensure t) :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)

View file

@ -222,6 +222,17 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu
(setq global-auto-revert-mode nil) (setq global-auto-revert-mode nil)
(setq auto-revert-use-notify t) (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 #+END_SRC
** Registers ** Registers
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el
@ -1339,6 +1350,20 @@ EAF doesn't work on Wayland :(
(use-package gdscript-mode (use-package gdscript-mode
:hook (gdscript-mode . lsp-deferred) :hook (gdscript-mode . lsp-deferred)
:ensure t) :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 #+END_SRC
** Terminal ** Terminal
#+BEGIN_SRC emacs-lisp :tangle config.el #+BEGIN_SRC emacs-lisp :tangle config.el