馃尡 tiny neovim plugin keeping your session safe
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 42 lines 885 B view raw
1local config = {} 2 3---@class nivvie.config.proto 4---@field session_dir? string 5---@field autosave? boolean 6---@field autorestore? boolean 7 8---@class nivvie.config 9---@field session_dir string 10---@field autosave boolean 11---@field autorestore boolean 12 13---@type nivvie.config 14config.default = { 15 -- where sessions are stored 16 session_dir = vim.fn.stdpath 'state' .. '/sessions', 17 -- save on exit 18 autosave = true, 19 -- load on start 20 autorestore = true, 21} 22 23---@type nivvie.config.proto 24config.current = {} 25 26---@return nivvie.config 27function config.get() 28 return vim.tbl_deep_extend('force', config.default, config.current) 29end 30 31---@param cfg nivvie.config.proto 32---@return nivvie.config 33function config.override(cfg) 34 return vim.tbl_deep_extend('force', config.default, cfg) 35end 36 37---@param cfg nivvie.config.proto 38function config.set(cfg) 39 config.current = cfg 40end 41 42return config