Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.3 KB

README.md

File metadata and controls

56 lines (43 loc) · 1.3 KB

last-sessions.nvim

Save and Load sessions without :mksessions

Why?

There are many plugins to save and restore current session to file. I used some plugins which wrapped native :mksession of neovim. But the :mksession and restore command doesn't work what I expected. They omitted some files from opened buffer. And some plugins have too heavy features to use this plugin for just saving last session. So I made this plugin without using :mksession and restore opened buffer files correctly when VimLeave.

It is still developing, so I'll fix it continuously until I satisfied.

Installation

	-- lazy.nvim
	return {
		'Jaehaks/last-session.nvim',
			branch = 'main',
			opts = {}
	}

configuration

-- This is default configuration
opts = {
	auto_save    = false,     -- save last session automatically when VimLeave
	path         = vim.fn.stdpath('data') .. '/last-session/last-session.txt',
	ignored_list = {
		ignored_type = {},    -- List of file extensions or filetypes to ignore
		ignored_dir  = {},    -- List of directory path patterns to ignore
	}
}

ignored_list

It is table which includes filetype, extension or directory string pattern to ignore for session

	-- example
	ignored_list = {
		ignored_type = {
			'help',
		},
		ignored_dir = {
			'doc\\',
		}
	}