Skip to content

Navigation Menu

Sign in
Sign up

feat(main): add option to sync current editable buffer with parent buffer - #192

Open
tyzerrr wants to merge 2 commits into
folke:main from
tyzerrr:feat/sync-parent
Open

feat(main): add option to sync current editable buffer with parent buffer #192
tyzerrr wants to merge 2 commits into
folke:main from
tyzerrr:feat/sync-parent

Conversation

@tyzerrr

@tyzerrr tyzerrr commented Dec 29, 2025

Copy link
Copy Markdown

This pull request introduces a new feature that keeps the parent window's buffer in sync with the zen window in Zen Mode, which is particularly useful for preserving buffer state (such as LSP) when switching buffers. The implementation includes a new configuration option, supporting logic, and event-driven synchronization.

Feature: Parent Buffer Synchronization

  • Added a sync_parent_buffer configuration option (enabled by default) to the Zen Mode setup, allowing users to keep the parent window's buffer synchronized with the zen window.
  • Introduced the sync_parent_buffer_enabled flag and related logic in view.lua to control whether buffer synchronization is active.
  • Added an autocommand on BufEnter to trigger buffer synchronization between the zen window and its parent window.
  • Implemented the sync_parent_buffer function in view.lua to perform the actual buffer synchronization when appropriate.
  • Exposed a new sync_parent_buffer function in plugins.lua to allow toggling the synchronization feature programmatically.

@github-actions github-actions Bot added the size/m Medium PR (<50 lines changed) label Dec 29, 2025
@tyzerrr tyzerrr changed the title (削除) feat: Add option to sync current editable buffer with parent buffer (削除ここまで) (追記) feat(main): Add option to sync current editable buffer with parent buffer (追記ここまで) Dec 29, 2025
@tyzerrr tyzerrr reopened this Dec 29, 2025
@tyzerrr tyzerrr changed the title (削除) feat(main): Add option to sync current editable buffer with parent buffer (削除ここまで) (追記) feat(main): add option to sync current editable buffer with parent buffer (追記ここまで) Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

size/m Medium PR (<50 lines changed)

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /