1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-27 21:19:51 -05:00

Add projectile neotree function

This commit is contained in:
Jack Foltz 2018-10-27 11:05:29 -04:00
parent 15e5847eef
commit 9805ae622d
Signed by: foltik
GPG Key ID: 303F88F996E95541

View File

@ -710,7 +710,22 @@ Projectile provides project-level features like
make shortcuts and file switching make shortcuts and file switching
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package projectile (use-package projectile
:init
(defun foltz-projectile-neotree () "Open NeoTree in the project root"
(interactive)
(let
((project-dir (projectile-project-root))
(file-name (buffer-file-name)))
(neotree-toggle)
(if project-dir
(if (neo-global--window-exists-p)
(progn
(neotree-dir project-dir)
(neotree-find file-name))))))
:general :general
(:keymaps 'projectile-command-map
"t" 'foltz-projectile-neotree)
(foltz-leader-def (foltz-leader-def
:states 'normal :states 'normal
"p" '(:keymap projectile-command-map)) "p" '(:keymap projectile-command-map))