Skip to content

Conversation

@twio142
Copy link
Contributor

@twio142 twio142 commented Oct 20, 2025

Users can now make a repository, initially opened as ephemeral, persistent. This prevents the repository from being deleted when Neovim exits.

A new :GitDevPersist user command has been introduced for this purpose.

This is implemented by:

  • Removing the "VimLeavePre" autocmd responsible for cleanup.
  • Updating the session state to reflect the change.
  • Persisting this choice in the history by updating the record's options, ensuring the repository is opened as non-ephemeral in the future.
  • Linking the active session context to its history record via a new history_key.

@twio142
Copy link
Contributor Author

twio142 commented Oct 20, 2025

Close #34

Users can now make a repository, initially opened as ephemeral,
persistent. This prevents the repository from being deleted when Neovim
exits.

A new `:GitDevPersist` user command has been introduced for this
purpose.

This is implemented by:
- Removing the "VimLeavePre" autocmd responsible for cleanup.
- Updating the session state to reflect the change.
- Persisting this choice in the history by updating the record's
  options, ensuring the repository is opened as non-ephemeral in
  the future.
- Linking the active session context to its history record via a
  new `history_key`.
Copy link
Owner

@moyiz moyiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to implement this feature and submit a PR. I totally neglected this feature request 😁

I have left few comments, will gladly merge this afterwards.

@moyiz moyiz merged commit 137c88a into moyiz:master Oct 23, 2025
2 checks passed
@twio142 twio142 deleted the feat/persist branch November 30, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants