{"id":15155459,"url":"https://github.com/tigion/nvim-sessions","last_synced_at":"2025-10-24T12:30:32.597Z","repository":{"id":254301656,"uuid":"845532471","full_name":"tigion/nvim-sessions","owner":"tigion","description":"A simple session management plugin for neovim.","archived":false,"fork":false,"pushed_at":"2025-02-06T10:33:26.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T11:30:22.455Z","etag":null,"topics":["lua","neovim","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tigion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-21T12:37:08.000Z","updated_at":"2025-02-06T10:33:29.000Z","dependencies_parsed_at":"2024-08-22T17:11:22.727Z","dependency_job_id":"4033a0e3-8d05-4196-be2c-9321a856f08f","html_url":"https://github.com/tigion/nvim-sessions","commit_stats":null,"previous_names":["tigion/nvim-sessions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigion%2Fnvim-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigion%2Fnvim-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigion%2Fnvim-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigion%2Fnvim-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigion","download_url":"https://codeload.github.com/tigion/nvim-sessions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237964418,"owners_count":19394391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","neovim","neovim-plugin"],"created_at":"2024-09-26T18:21:55.315Z","updated_at":"2025-10-24T12:30:32.590Z","avatar_url":"https://github.com/tigion.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nvim-sessions\n\nA simple session management plugin for Neovim. It uses\n[`:mksession`][mksession] to save and [`:source`][source] to load working\ndirectory based sessions.\n\n[mksession]: https://neovim.io/doc/user/starting.html#%3Amksession\n[sessionoptions]: https://neovim.io/doc/user/options.html#'sessionoptions'\n[source]: https://neovim.io/doc/user/repeat.html#%3Asource\n\n\u003e [!WARNING]\n\u003e This plugin is based on my personal needs. Work in progress. 🚀\n\nOther better plugins are:\n\n- [Shatur/neovim-session-manager](https://github.com/Shatur/neovim-session-manager)\n- [folke/persistence.nvim](https://github.com/folke/persistence.nvim)\n- [tpope/vim-obsession](https://github.com/tpope/vim-obsession)\n- [echasnovski/mini.sessions](https://github.com/echasnovski/mini.sessions)\n- and many more ...\n\n## Features\n\n- Uses **one** session file per **working directory**.\n- Session files are stored **global** in `vim.fn.stdpath('data')` in\n  a configurable subdirectory.\n- Sessions can **manually** saved, loaded and deleted.\n- Optionally, the session is automatically saved when Neovim is closed.\n- It ignores empty windows from plugins like nvim-tree or outline\u003cbr /\u003e\n  (removes temporary `blank` from the `:h sessionoptions`). Can be configured\n  in the options.\n\n\u003e [!TIP]\n\u003e See [`:h sessionoptions`][sessionoptions] to change what is stored in the\n\u003e session file with `:mksession`.\n\n## Requirements\n\n- Neovim \u003e= 0.10\n\n## Installation\n\n### [lazy.nvim]\n\n[lazy.nvim]: https://github.com/folke/lazy.nvim\n\n```lua\nreturn {\n  'tigion/nvim-sessions',\n  event = 'VeryLazy',\n  cmd = 'Session',\n  keys = {\n    { '\u003cLeader\u003ews', '\u003cCmd\u003eSession save\u003cCR\u003e', desc = 'Save session (cwd)' },\n    { '\u003cLeader\u003ewl', '\u003cCmd\u003eSession load\u003cCR\u003e', desc = 'Load session (cwd)' },\n  },\n  ---@module 'sessions'\n  ---@type sessions.Config\n  opts = {},\n}\n```\n\n## Configuration\n\nThe default options are:\n\n```lua\n---@class sessions.Config\n---@field auto_save? boolean Automatically saves the session on Neovim exit.\n---@field directory? string The subdirectory in `vim.fn.stdpath('data')` where the sessions are saved.\n---@field ignore_blank? boolean Ignores saving sessions for blank buffers.\n---@field ignored_filetypes? table\u003cstring, boolean\u003e Ignores session saving for the specified filetypes.\n---@field notify? boolean Notifies when a session is loaded or saved.\n---@field overwrite? boolean Overwrites existing session files without confirmation.\n\n---The default options.\n---@type sessions.Config\nlocal defaults = {\n  auto_save = false,\n  directory = 'sessions', -- Will be created if not available.\n  ignore_blank = true,\n  ignored_filetypes = { -- Will prevent session saving if found.\n    alpha = true,\n    dashboard = true,\n    snacks_dashboard = true,\n  },\n  notify = true,\n  overwrite = true,\n}\n```\n\nFor other plugin manager, call the setup function\n`require('sessions').setup({ ... })` directly.\n\n## Usage\n\n| Command           | Description                                                            |\n| ----------------- | ---------------------------------------------------------------------- |\n| `:Session info`   | Shows information about the current session and the `Session` command. |\n| `:Session save`   | Saves the current session for the current working directory.           |\n| `:Session load`   | Loads the session for the current working directory.                   |\n| `:Session delete` | Deletes the session for the current working directory.                 |\n\nWith `require('sessions').exists()` you can check if a session exists for the\ncurrent working directory.\n\nRun `:checkhealth sessions` to check the health of the plugin.\n\n## TODO\n\n- [x] Add lua comment [annotations](https://luals.github.io/wiki/annotations/).\n- [x] Add auto save.\n- [x] Update readme.\n- [x] Move simple session management from tigion.core.util.session to a plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigion%2Fnvim-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigion%2Fnvim-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigion%2Fnvim-sessions/lists"}