Skip to content

Refactor and optimize some things - #1

Merged
tigion merged 13 commits into
mainfrom
refactor
Jun 17, 2026
Merged

tigion merged 13 commits into
mainfrom
refactor

Conversation

@tigion

@tigion tigion commented Jun 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

@tigion
tigion force-pushed the refactor branch 2 times, most recently from da3a5f0 to 19befbb Compare June 17, 2026 08:00
@tigion
tigion force-pushed the refactor branch 4 times, most recently from d3903fa to 1be7231 Compare June 17, 2026 10:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Not ready to approve

A logic inversion in the session directory creation check will prevent sessions from being saved correctly in common cases.

Pull request overview

This PR refactors sessions.nvim’s session naming and initialization flow, adds some filesystem/path utilities, and refreshes the README to reflect new setup and installation guidance.

Changes:

  • Introduces hashed, filename-safe session names derived from the current working directory.
  • Moves the :Session user command (and a Neovim version gate) into a plugin/ entrypoint and simplifies setup() to primarily configure auto-save.
  • Updates health checks and README installation/configuration sections.
File summaries
File Description
README.md Reworks documentation for installation (incl. vim.pack) and configuration usage examples.
plugin/sessions.lua Adds Neovim version check and defines the :Session user command + completion.
lua/sessions/util.lua Adds path→filename helper + hashed session naming and filesystem predicate helpers.
lua/sessions/session.lua Switches to hashed session filenames and refactors save/load flow using new util helpers.
lua/sessions/notify.lua Minor comment/doc formatting changes.
lua/sessions/init.lua Simplifies setup: config + auto-save autocmd management; removes command creation.
lua/sessions/health.lua Refactors directory/session checks and reuses new util helpers.
lua/sessions/config.lua Adjusts defaults/docs and changes how defaults are merged into runtime options.

Copilot's findings

  • Files reviewed: 7/8 changed files
  • Comments generated: 3

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/sessions/session.lua
Comment thread lua/sessions/session.lua Outdated
Comment thread lua/sessions/util.lua Outdated
…in :source

- correct docstring: readable to writeable

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Not ready to approve

The new hashed session filename scheme appears to break backward compatibility for existing saved sessions and the README’s lazy-loading/version messaging needs clarification.

Copilot's findings
  • Files reviewed: 7/8 changed files
  • Comments generated: 3

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

Comment thread README.md
Comment thread README.md
Comment thread lua/sessions/session.lua
@tigion
tigion merged commit 73886fa into main Jun 17, 2026
1 check passed
@tigion
tigion deleted the refactor branch June 17, 2026 10:55
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