Skip to content
Gennaro Tedesco edited this page Feb 15, 2024 · 1 revision

Welcome to the nvim-possession wiki!

Minimal repro.lua to reproduce an issue

Please use the below template to reproduce any issue and adapt the configuration options (and perhaps other plugins) accordingly. Once so, run nvim -u repro.lua

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"--single-branch",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	{ "craftzdog/solarized-osaka.nvim" },
	{
		"gennaro-tedesco/nvim-possession",
		dependencies = {
			"ibhagwan/fzf-lua",
		},
		config = true,
		init = function()
			local possession = require("nvim-possession")
			vim.keymap.set("n", "<leader>sl", function()
				possession.list()
			end)
			vim.keymap.set("n", "<leader>sn", function()
				possession.new()
			end)
			vim.keymap.set("n", "<leader>su", function()
				possession.update()
			end)
			vim.keymap.set("n", "<leader>sd", function()
				possession.delete()
			end)
		end,
	},
	-- add any other puglins down here
}
vim.g.mapleader = " "
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.opt.termguicolors = true
vim.cmd([[colorscheme solarized-osaka]])
Clone this wiki locally