Forced continuation for the root of the project

I use neotree and shell. I can open neotree in my project root using neotree-find-project-root, and it is beautiful.

When I open a file in a subfolder, it changes the neotree root to the folder containing this file. This is less useful to me than if the neotree view remained the root of the project.

Can I make neotree always display the project root folder, and not automatically drop into subfolders?

(Switching neotree and reusing neotree-find-project-root will return it to the root directory, but it hurts to do it manually. Should there be a way to do this automatically?)

+4
source share
1 answer

Neotree . neotree, , .

, - .

(add-hook 'find-file-hook
    (lambda ()
        (let ((buffer (current-buffer)))
            (neotree-find (projectile-project-root))
            (set-buffer buffer))))

, . neotree , , .

0

Source: https://habr.com/ru/post/1677587/


All Articles