{"id":25808543,"url":"https://github.com/sapnvim/sapnvim_project.nvim","last_synced_at":"2025-10-18T16:09:51.687Z","repository":{"id":278327089,"uuid":"935197868","full_name":"sapnvim/sapnvim_project.nvim","owner":"sapnvim","description":"This plugin adds a project management function to nvim, which allows you to jump between saved projects.","archived":false,"fork":false,"pushed_at":"2025-02-26T07:02:29.000Z","size":51,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T08:19:10.303Z","etag":null,"topics":["lua","nvim"],"latest_commit_sha":null,"homepage":"https://github.com/sapnvim/sapnvim_project.nvim","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapnvim.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":"2025-02-19T04:03:39.000Z","updated_at":"2025-02-26T07:02:32.000Z","dependencies_parsed_at":"2025-02-26T08:19:00.172Z","dependency_job_id":null,"html_url":"https://github.com/sapnvim/sapnvim_project.nvim","commit_stats":null,"previous_names":["sapnvim/sapnvim_project.nvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapnvim%2Fsapnvim_project.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapnvim%2Fsapnvim_project.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapnvim%2Fsapnvim_project.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapnvim%2Fsapnvim_project.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapnvim","download_url":"https://codeload.github.com/sapnvim/sapnvim_project.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241068346,"owners_count":19904014,"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","nvim"],"created_at":"2025-02-27T22:28:53.924Z","updated_at":"2025-10-18T16:09:51.666Z","avatar_url":"https://github.com/sapnvim.png","language":"Lua","readme":"# sapnvim_project.nvim\nThis plugin adds a project management function to nvim, which allows you to jump between saved projects.\n\n\n## Features\n\n### Core Project Management Features\n\n- **Project Creation** - Save the current workspace as a named project through the `ProjectAdd` command\n\n- **State Saving** - Use the `ProjectSave` command to update the latest state of an existing project\n\n- **Project Loading** - Select and load a saved project from the list through the `ProjectLoad` command\n\n- **Project Closing** - Use the `ProjectClose` command to close the current project and save the latest state\n\n- **Quick Switching** - Seamlessly switch between the two most recently used projects through the `ProjectToggle` command\n\n### Plugin Advantages\n\n- 🚀 **Workflow Continuity** - Maintain the context of multiple projects and reduce switching costs\n\n- 🔍 **Focus on Development** - Maintain an independent working environment and state for each project\n\n- ⏱️ **Improve Efficiency** - Immediately restore to the exact state you left last time without resetting the environment\n\n- 📁 **Space Organization** - Systematically manage multiple projects to avoid workspace clutter\n\n### Session Features\n\n- Automatically save open buffers, window layouts, cursor positions and other working states\n- Support custom session save options to control the specific content that needs to be saved\n- Record project access history to facilitate quick navigation between frequently used projects\n- **Auto Session Restore** - Automatically load sessions on startup based on configuration\n\n\n## Install\n### `lazy.nvim`\n\u003cdetails\u003e\n    \u003csummary\u003eTelescope.nvim 🌞\u003c/summary\u003e\n\n```lua\nreturn {\n  'sapnvim/sapnvim_project.nvim',\n  dependencies = {\n    { 'nvim-telescope/telescope.nvim' },\n    { 'nvim-lua/plenary.nvim' },\n    { 'nvim-telescope/telescope-fzf-native.nvim',   build = 'make', },\n  },\n  opts = {\n    --- The address where the project is stored\n    --- Useing Lazy.nvim, default: '~/.local/share/nvim/lazy/sapnvim_project.nvim/sessions'\n    --- no Using Lazy.nvim, details: 'vim.fn.stdpath(\"config\") .. \"/sessions\"'\n    sessions_storage_dir = '~/.local/share/nvim/lazy/sapnvim_project.nvim/sessions',\n\n    --- This is a data file\n    --- Records the projects that have been saved in the project storage directory\n    sessions_data_filename = 'sessions_data.lua',\n\n    --- This is a setting related to session saving in Vim/Neovim\n    --- View details :h sessionoptions\n    sessionoptions = { \"buffers\", \"curdir\", \"tabpages\", \"winsize\", \"help\", \"globals\", \"skiprtp\", \"folds\" },\n\n    --- Controls how sessions are restored on startup:\n    --- 'last' - Load the most recent session\n    --- 'current' - Load session matching the current directory\n    --- 'none' - Disable auto-restore (default)\n    auto_session_restore = 'none',\n\n    -- Useing telescope\n    picker = 'telescope'\n\n    --- telescope config\n    picker_opts = {\n    }\n  }\n}\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003efzf-lua 🌞\u003c/summary\u003e\n\n```lua\nreturn {\n  'sapnvim/sapnvim_project.nvim',\n  dependencies = {\n    { 'fzf-lua' },\n    { 'nvim-tree/nvim-web-devicons' },\n    { 'echasnovski/mini.icons' },\n  },\n  opts = function(_, _)\n    local fzf_lua = require('sapnvim_project.picker.fzf_lua')\n    return {\n      --- The address where the project is stored\n      --- Useing Lazy.nvim, default: '~/.local/share/nvim/lazy/sapnvim_project.nvim/sessions'\n      --- no Using Lazy.nvim, details: 'vim.fn.stdpath(\"config\") .. \"/sessions\"'\n      sessions_storage_dir = '~/.local/share/nvim/lazy/sapnvim_project.nvim/sessions',\n\n      --- This is a data file\n      --- Records the projects that have been saved in the project storage directory\n      sessions_data_filename = 'sessions_data.lua',\n\n      --- This is a setting related to session saving in Vim/Neovim\n      --- View details :h sessionoptions\n      sessionoptions = { \"buffers\", \"curdir\", \"tabpages\", \"winsize\", \"help\", \"globals\", \"skiprtp\", \"folds\" },\n\n      --- Controls how sessions are restored on startup:\n      --- 'last' - Load the most recent session\n      --- 'current' - Load session matching the current directory\n      --- 'none' - Disable auto-restore (default)\n      auto_session_restore = 'none',\n\n      -- Useing fzf-lua\n      picker = 'fzf-lua',\n\n      --- fzf-lua config\n      picker_opts = {\n        winopts = { height = 0.33, width = 0.7 },\n        prompt = \"Select a project\u003e \",\n        fzf_opts = {\n          [\"--ansi\"] = \"\",                                      -- Enable ANSI color codes\n          [\"--delimiter\"] = fzf_lua.delimiter,                  -- Set delimiter for data parsing\n          [\"--with-nth\"] = \"2..\",                               -- Hide the ID column\n          [\"--header\"] = \"name                            path\" -- Display header\n        },\n        -- Set the default action to our module-level function\n        actions = {\n          ['default'] = fzf_lua.select_and_load_session\n        }\n      }\n    }\n  end\n}\n```\n\u003c/details\u003e\n\n## Commands\n- *`ProjectAdd`*  \nSave the current workspace as a project. The project name and path are entered by the user.\n\n- *`ProjectSave`*  \nWhen the current workspace is a project, save the latest state.  \n\n- *`ProjectLoad`*  \nLoad a project from the list of saved projects into the current workspace  \n\n- *`ProjectClose`*  \nUsed to close the current project and save the latest status before closing.\n\n- *`ProjectToggle`*  \nQuickly toggle between the two most recently used projects, enabling efficient switching between related tasks.\n\n\nUsing commands may not be very convenient, \nhere are some recommended shortcut key bindings to make execution easier.\n```\nvim.keymap.set('n', '\u003cleader\u003esa', '\u003ccmd\u003eProjectAdd\u003ccr\u003e', { desc = 'Create a project'})\nvim.keymap.set('n', '\u003cleader\u003esc', '\u003ccmd\u003eProjectClose\u003ccr\u003e', { desc = 'Close current project'})\nvim.keymap.set('n', '\u003cleader\u003esw', '\u003ccmd\u003eProjectSave\u003ccr\u003e', { desc = 'Save exists project'})\nvim.keymap.set('n', '\u003cleader\u003esf', '\u003ccmd\u003eProjectLoad\u003ccr\u003e', { desc = 'Load project in list'})\nvim.keymap.set('n', '\u003cleader\u003est', '\u003ccmd\u003eProjectToggle\u003ccr\u003e', { desc = 'Toggle between recent projects'})\n```\n\n## Configuration Options\n\n### auto_session_restore\nControls how sessions are restored when Neovim starts:\n- `'last'`: Automatically loads the most recent session regardless of current directory\n- `'current'`: Loads a session matching the current directory if one exists\n- `'none'`: Disables automatic session restoration (default)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapnvim%2Fsapnvim_project.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapnvim%2Fsapnvim_project.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapnvim%2Fsapnvim_project.nvim/lists"}