Skip to content

HUAHUAI23/telescope-session.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

  ____  _____            _                             _             
 |___ \|___ /     __   _(_)_ __ ___  ___  ___  ___ ___(_) ___  _ __  
   __) | |_ \ ____\ \ / / | '_ ` _ \/ __|/ _ \/ __/ __| |/ _ \| '_ \ 
  / __/ ___) |_____\ V /| | | | | | \__ \  __/\__ \__ \ | (_) | | | |
 |_____|____/       \_/ |_|_| |_| |_|___/\___||___/___/_|\___/|_| |_|


πŸ”—Telescope 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 is required.

Optional

Getting Started

demo

Using packer.nvim

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

" 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
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

-- press <space>s  will open session files list
vim.keymap.set("n", "<space>s", "<cmd>Telescope xray23 list<cr>")

-- 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

git clone https://github.com/HUAHUAI23/telescope-session.nvim.git
cd telescope-session.nvim/lua/session-manage/

See plugin/session-manage for details

Releases

No releases published

Packages

No packages published

Languages