auto-session
auto-session copied to clipboard
[FEATURE] Option to load/save session via VCS root directory (eg: root of git project directory)
Is your feature request related to a problem? Please describe. My sessions cannot be easily saved/loaded via the root directory of my git project.
Describe the solution you'd like I would like the ability for sessions to be saved/loaded via the root directory of my git project.
Describe alternatives you've considered Hooking into existing functionality somehow to perform the necessary directory operations myself.
Additional context
- git root directory can be found via
git rev-parse --show-toplevel
(source) - I'm sure there's some cases like "i started a session, then opened files outside of the VCS directory" that may require a sensible default behaviour to handle.
Hey @tsnieman, thanks for the issue submission! Could you elaborate on what you mean by "My sessions cannot be easily saved/loaded via the root directory of my git project."? Auto Session works by saving all session files in a common directory, it then uses the cwd (current working directory) to figure out what the name of the session should be for the directory you opened nvim in, and loads that session from the common directory.
Your phrase seems to suggest you want to explicitly save a session file someplace other than in the common dir, which is possible using the command :SaveSession ./your-session
but that's not really the intended workflow of this plugin.