mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-28 05:27:06 -05:00
Add projectile neotree function
This commit is contained in:
parent
15e5847eef
commit
9805ae622d
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user