Persistent state - #86
Open
bellhyve wants to merge 40 commits into
Open
Conversation
currently only writes the header when closing
will probably need a sophisticated way of handling this eventually for testing shada behaviour, but for now this is fine
It was necessary make pos in file args an option to prevent it from overwriting the file positions loaded from persistence. Alignment is not quite right... I think we need to persist selections instead of view positions, or disable center aligning
encoding was found to be necessary because registers can contain line endings, which breaks the previous lines-of-text format
useful in the case of bare git repos, where the git dir is not always named .git, and so the previous exclusion wouldn't catch it.
Vendors helix-editor#9143 (intarga/persistent_state) onto gj1118. Persists (opt-in via [editor.persistence]): - command history (:) - search history (/) - file cursor positions (old-files) - internal clipboard State lives under ~/.local/state/helix (bincode). Defaults all off. Also: skip applying implicit CLI Position::default() after open so old-files restore is not clobbered; :reload-history command; integration test.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
bellhyve
force-pushed
the
persistent_state
branch
from
August 4, 2026 13:41
5267da2 to
6d3fda8
Compare
Author
|
FYI, I did forget fmt but the rest of the red CI was codeberg 504 on the tree sitter pulls. These tests will pass if codeberg is awake today. Tested ok on my end! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here's a working implementation of persistence. It's three-way merged from your excellent fork and a popular (abandoned) Helix PR, Persistent state - #9143, including:
Everything has the functionality and config knobs we'd expect, and it appears to work quite well; I've tested all the options listed in your README.md alongside it. I also generated an merge playbook in docs/persistence-merge-notes.md to hopefully simplify the process for future editors. Note that this merge involved me throwing a few quarters into the old clank tank (AI agents), so though I read over everything, it needs the review of an experienced Rust developer.
Thanks so much for the amazing curation of Helix!