Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huahuai23/telescope-session.nvim
manage your vim session with telescope ðŸ”
https://github.com/huahuai23/telescope-session.nvim
lua neovim neovim-plugin nvim telescope-extension vim
Last synced: 10 days ago
JSON representation
manage your vim session with telescope ðŸ”
- Host: GitHub
- URL: https://github.com/huahuai23/telescope-session.nvim
- Owner: HUAHUAI23
- Created: 2022-10-03T17:58:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-20T03:34:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T15:57:09.311Z (24 days ago)
- Topics: lua, neovim, neovim-plugin, nvim, telescope-extension, vim
- Language: Lua
- Homepage:
- Size: 8.76 MB
- Stars: 26
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
____ _____ _ _
|___ \|___ / __ _(_)_ __ ___ ___ ___ ___ ___(_) ___ _ __
__) | |_ \ ____\ \ / / | '_ ` _ \/ __|/ _ \/ __/ __| |/ _ \| '_ \
/ __/ ___) |_____\ V /| | | | | | \__ \ __/\__ \__ \ | (_) | | | |
|_____|____/ \_/ |_|_| |_| |_|___/\___||___/___/_|\___/|_| |_|
```---
![](https://img.shields.io/badge/Perfect-neovim%20picgo-green)
🔗[Telescope](https://github.com/nvim-telescope/telescope.nvim) a highly extendable fuzzy finder over lists. This plugin is an extension of telescope, it provides something to help you manage your vim sessions## Features
---
- Display your session file list
- Switching between your vim seesions
- Manage your seesion file
- Save your vim seesion to the default location (or a custom location)## Requirements
---
- Neovim (v0.7.0) or the latest neovim nightly commit is required for telescope.nvim to work.
- 🔗[lua/plenary.nvim](https://github.com/nvim-lua/plenary.nvim) is required.### Optional
- 🔗[kyazdani42/nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons) (used to display file icons)
## Getting Started
### demo
![](./pic/xray23.gif)
### Using packer.nvim
```lua
use({
"nvim-telescope/telescope.nvim",
-- tag = "0.1.0",
branch = "0.1.x",
requires = { { "nvim-lua/plenary.nvim" } },
config = function()
require("telescope").setup({
extensions = {
xray23 = {
-- location to store session files, default is vim.fn.stdpath("data") .. "/vimSession"
sessionDir = "/path/to/session-file",
},
},
})
-- loade telescope-session.nvim
require("telescope").load_extension("xray23")
end,
})
use("HUAHUAI23/telescope-session.nvim")
```---
### Usage
---
#### commands
```vim
" Display your session file list
:Telescope xray23 list" input the seesion file name (null will use default session file name)
" and save it to the default location (or a custom location)
:Telescope xray23 save
```#### telescope keybinds
see 🔗[Telescope Default Mappings](https://github.com/nvim-telescope/telescope.nvim#default-mappings)
**telescope-session.nvim** provides two additional normal mode keybinds
| Mappings | Action |
|----------------|------------------------------------------------------|
| `enter` | switch to selected session |
| `d` | delete selected session |**neovim keybind**
if you want to set up neovim keymap you can do something like this```lua
-- press s will open session files list
vim.keymap.set("n", "s", "Telescope xray23 list")-- or create a user command and use it to save vim session
vim.api.nvim_create_user_command("SessionSv", function()
vim.api.nvim_cmd(vim.api.nvim_parse_cmd("Telescope xray23 save", {}), {})
end, { desc = "load user session,like workspace" })```
### Development
```bash
git clone https://github.com/HUAHUAI23/telescope-session.nvim.git
cd telescope-session.nvim/lua/session-manage/
```See [plugin/session-manage](https://github.com/HUAHUAI23/telescope-session.nvim/blob/main/lua/session-manage/init.lua) for details