-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
[ Feature Request ] Project Sessions #60
Comments
Hey @Chaitanyabsprip thanks for the submission! The one drawback I can see from something like this is having to manage your multiple sessions per project in a more manual way. The thing I love about auto-session is the fact that I don't have to think about it 99% of the time. I can't really work it out in my head right now how the flow around these sub-sessions would be initially, but I'll admit I'm intrigued. Let's keep the discussion going here! |
How I have thought it out is that there will be global sessions for directories that would be stored in |
The fact that the global sessions will continue to work as they are would ensure that you dont have to think at all about automatically loading the session that you left neovim on. Just on top of that the use will have the option to quickly set up a layout(with respective files) from the saved sessions in |
Ignore the above linking of the PR, had the wrong issue number in my commit message, sorry. |
I just want to weigh in on this and say this would be really exciting. I use |
@davidvalaz Could you describe your workflow perhaps in a bit more detail? I'd like to understand the needs people have a bit more before I start working on something. |
Absolutely. So I am generally only really working across a couple of projects at a time. However across those projects I will be diving across various branches and pull requests to review changes and write/amend code. As such I'll have a few splits with many buffers open. From my terminal I may choose to switch a branch, open up Neovim, use I also use a cool little helper (which is exposed by Sometimes I forget to use In summary, being able to automatically start a session across a git branch is what I'm looking for in a session plugin. |
I wonder where Prosession stores it's sessions. This could technically be achieved relatively easily if you have session files in the project's root with a name matching the branch for example. Ofc in that case some plugin code would have to change to support the loading of those sessions, or really just some sort of precedence logic for what to load first. I do wonder if there's a better way to go about it, I'm not a fan of having session files in the project directories themselves. |
Completely agree! Prosession does allow you to customise the directory where sessions are stored. I use the following: vim.g.prosession_dir = vim.fn.stdpath('config')..'/.session' I'm assuming it tries to load from that directory only when you run I back up my config folder with Tresorit (like Dropbox but way more secure) and also in my dotfiles repo, so it's nice to keep my sessions files close to my Neovim config 😄 . |
Instead of directly having files in the global sessions directory, create directories for each session, anyway a session belongs to a directory so this won't distrupt any current behaviour, but this will allow for you to save the sub-sessions in that directory indicating the parent project/directory and the name of the file indicating git branch/custom name. I am eagerly waiting for this feature. If you've started working on this let me know which branch it is, maybe I could contribute whenever I get time. |
Hey @Chaitanyabsprip, I have not started any work on this yet. One thing to note with your approach is I'd be more than happy to review a PR and generally help out if you or anyone else is able to dedicate to this before I end up getting to it myself. |
I was inspired by this plugin and had an idea of plugin that manages project sessions. I am usually working with multiple windows, production code on one side and tests on other or just multiple windows from different files belonging to a feature. I find the process of reopening and rearranging these windows and buffers dreadful and am often too lazy to do it. It would be a nice idea if as an extension to auto-session I could have a command that stores the current layout and open buffers as a session in a project level hidden directory, something like what
.idea
does for intelliJ based IDEs and.vscode
does for well, VS Code. Let me know if this is a feature this plugin's ideology warrants it to have.EDIT: This feature will be a great addition in support of session-lens. Being able to traverse through different sessions for a project. Effectively these will be mini work-spaces.
The text was updated successfully, but these errors were encountered: