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

Github-Branch based Auto-Session-Management #43

Open
joehannes opened this issue Apr 29, 2022 · 2 comments
Open

Github-Branch based Auto-Session-Management #43

joehannes opened this issue Apr 29, 2022 · 2 comments
Labels
help wanted Extra attention is needed idea

Comments

@joehannes
Copy link

What?
I quite like advanced session management as in existing plugins (rmagatti/auto-session, jedrzejboczar/possession.nvim), but they lack one feature per default: automatic session management as of current git-branch (reflecting current working ticket).
Additionally I'd like to see a picker as well, just in case an old task gets picked up again in a new (bugfix/chore/...)-branch and I want to reuse that old session of the old branch

Why?
Session management is useful if you work on the same project, right? But inside of a project, I usually got different sessions/layouts/tabpages as per task, which is usually reflected by specific branches.

Potential existing implementations:
https://github.com/superDross/ticket.vim

Potential pitfalls:
?

@joehannes joehannes added help wanted Extra attention is needed idea labels Apr 29, 2022
@matu3ba
Copy link

matu3ba commented Jul 7, 2022

This should be relative straightforward to implement with shell script wrappers around your start file that looks up 1. the git branch, 2. path to load the session file from predefined paths (nvim -S sessionfile) and conversely storing the session file with a lua command that calls :mksession/:mksession!.

Once you are done with this, you can convert the hacky solution into a lua plugin.

Personally I do optimize to get fast my files fast into the buffer and available to harpoon via https://github.com/asbjornhaland/telescope-send-to-harpoon.nvim and telescope search -> C-q -> :cfdo :badd %.

@ariel-frischer
Copy link

Auto session supports this feature now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed idea
Projects
None yet
Development

No branches or pull requests

3 participants