Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neotree per frame #5682

Closed
cviebig opened this issue Apr 5, 2016 · 5 comments
Closed

Neotree per frame #5682

cviebig opened this issue Apr 5, 2016 · 5 comments
Labels
- Bug tracker - File browser stale marked as a stale issue/pr (usually by a bot)

Comments

@cviebig
Copy link

cviebig commented Apr 5, 2016

Hello.

I usually open multiple frames with one project each. For each project/frame I would like to have one neotree buffer. Unfortunately it seems that there can only exist one neotree per Emacs instance which means that opening it in one frame will close the one in the other frame. Do you see any reason in spacemacs for this behauvior? I couldn't find any information on that in general.

Thank you in advance!

Best regards
christoph

@bmag
Copy link
Collaborator

bmag commented Apr 5, 2016

According to jaypei/emacs-neotree#57, Neotree doesn't support this feature.

Maybe hooking an update of Neotree's buffer into various places1 can serve as an ad-hoc solution. I'm thinking of using the single Neotree buffer in all relevant frames/layouts/workspaces, but have its contents update to the current frame/layout/workspace automatically. Still isn't as good as proper multiple buffer support, though.

If you only want projectile+neotree synchronization, you can try one of these, and maybe make a PR if any of them seems to work well.

;; option 1
(add-hook 'projectile-after-switch-project-hook 'neotree-projectile-action)
;; option 2
(setq projectile-switch-project-action 'neotree-projectile-action)

1 various places: frame switch, layout (perspective) switch, workspace (eyebrowse) switch, project switch, ...

@cviebig
Copy link
Author

cviebig commented Apr 5, 2016

Hi @bmag, thank you for looking into this. Unfortunately I did not find that issue. My work around currently is to run multiple instances of Emacs, one per project, each one maintaining one frame and it's neotree buffer.

@howdoicomputer
Copy link

Oh man, I'm super interested in this and almost opened a duplicate bug report. I'm going to try out those hooks.

@howdoicomputer
Copy link

;; put this into your emacs dotfile
(setq projectile-switch-project-action 'neotree-projectile-action)

;; then
C-c p p <select project> RET

That works for me. I'm now able to bounce around projects and use neotree.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Bug tracker - File browser stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

4 participants