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

[FEATURE] Option to load/save session via VCS root directory (eg: root of git project directory) #154

Open
tyler-dot-earth opened this issue Aug 5, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tyler-dot-earth
Copy link

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.
@tyler-dot-earth tyler-dot-earth added the enhancement New feature or request label Aug 5, 2022
@rmagatti
Copy link
Owner

rmagatti commented Aug 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants