1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-24 04:22:50 -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
#+BEGIN_SRC emacs-lisp
(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
(:keymaps 'projectile-command-map
"t" 'foltz-projectile-neotree)
(foltz-leader-def
:states 'normal
"p" '(:keymap projectile-command-map))