Repository navigation
Replies: 16 comments
|
@tgaldi Do you have any session plugin in mind? I use https://github.com/gennaro-tedesco/nvim-possession but I'm wondering if some would prefer an alternative first. |
|
No, seems like there are quite a few plugins for session management. I imagine the two big ones would be: https://github.com/folke/persistence.nvim I know the mini suite is pretty popular. I use some specific plugins instead of the entire suite. Maybe an easy first pass would be to look for or create a session file in the root directory when a project is added? I'd rather just use your plugin :) |
|
I'll look right into it. |
|
@tgaldi Hey! I've managed to do a rough implementation for Unfortunately Logfile output.Regardless, I've implemented hooks to load a session on buf enter, and saving the project.nvim/lua/project/config/defaults.lua Lines 228 to 244 in 6219682 Note Bear in mind this needs some polishing, as I've seen errors being triggered on special cases. I need feeback from you, nonetheless! |
Update@tgaldi I've just realized there's BARE session management from It holds the opened projects on runtime, but I haven't elaborated on it. You can see the output with Are you aware of the |
|
@tgaldi I've updated the Warning The current implementation needs Note Used project_sessions.mp4 |
|
I tried the ProjectSession command but wasn't sure what it was doing. I was hoping the session integration would automatically restore the buffers for a project when you select a project. I tried running ProjectSession and I get:
I have the fd executable in my path. I should also mention that I use Telescope with Project and use manual mode: |
|
@tgaldi Interesting. I can't seem to replicate that error, even with Regardless of that, I've added a check in cb554e7 . Does it work for you?
Example video coming in a sec. |
|
I tried removing a project and then re-adding it. When I open the project and use |
|
@tgaldi I tried replicating your steps, but nothing bad happened. I hope my new patches could've fixed it. I appreciate your patience, by the way. DemonstrationThis is not related to your latest issue, by the way. project_nvim_example.mp4 |
|
No worries at all I appreciate you wanting to add this feature, I really love this plugin. I'm on Windows so maybe that is part of the issue. Maybe I'm misunderstanding the concept of sessions though... What I was imagining is some mechanism to save the current windows/buffers for a project, so that when you open the project again it restores everything. |
|
That can be achieved, but I'll have to rework how sessions are stored in the first placce, then add checks if bufnr/winid is available. I'll try some proof of concepts. It'll take me a bit. P.S. Don't worry, I've had something like that in mind for a while, but had to tend to stabilizing stuff. |
|
@tgaldi After debating myself for a while I've come to the conclusion I'm not following up on this (entirely). I LOVE the idea, don't get me wrong, but until I am able to deal with #24, and with the original plugin's implementations getting in the way (without absolutely wrecking this plugin), I think I'm going to address this later. In the meanwhile, I think this plugin can be paired with far more capable and complete session management plugins (that I know of). I'll move this to the Discussions section and pin it so that I don't forget about this (unlikely since I am very interested). I hope you'll understand. Sorry for the inconvenience! |
@tgaldi Hello there! If you're still interested in this plugin, this has been implemented for good! |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Did you check the docs and looked for existing issues?
CONTRIBUTING.mdREADME.md,:h project-nvim, etc.)Operating System and, if possible, what version?
Win11
What would you like integrated?
Integrate session management or integration with a session plugin so that opening a project opens the associated session.
How would this plugin improve?
I work on multiple projects and I need to re-open files whenever I open a project with this plugin. I don't use a session plugin (yet), but I'd love to see this plugin automate session management based on opening a project.
Have you considered alternative solutions?
No response
Is there any code implementation you'd suggest?
-- Leave this unchanged if there is no code you can includeAre there any bug issues related?
No response
Additional Context
No response
All reactions