Update generated nvim config
This commit is contained in:
@ -343,14 +343,144 @@ require("lazy").setup({
|
||||
["name"] = "web-devicons",
|
||||
},
|
||||
{
|
||||
"persistence",
|
||||
"persisted",
|
||||
["config"] = function(_, opts)
|
||||
require("persistence").setup(opts)
|
||||
require("persisted").setup(opts)
|
||||
|
||||
require("telescope").load_extension("persisted")
|
||||
end,
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/persistence.nvim",
|
||||
["dependencies"] = {
|
||||
{
|
||||
"telescope",
|
||||
["cmd"] = { "Telescope" },
|
||||
["config"] = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
|
||||
for i, extension in ipairs({ "undo", "ui-select", "fzf" }) do
|
||||
telescope.load_extension(extension)
|
||||
end
|
||||
end,
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
{
|
||||
"telescope-fzf-native",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope-fzf-native.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-fzf-native",
|
||||
},
|
||||
{
|
||||
"telescope-undo",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope-undo.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-undo",
|
||||
},
|
||||
{
|
||||
"telescope-ui-select",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope-ui-select.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-ui-select",
|
||||
},
|
||||
},
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope",
|
||||
["opts"] = {
|
||||
["defaults"] = {
|
||||
["mappings"] = {
|
||||
["i"] = {
|
||||
["<Esc>"] = function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/persisted.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "persistence",
|
||||
["opts"] = { ["options"] = vim.opt.sessionoptions:get() },
|
||||
["name"] = "persisted",
|
||||
["opts"] = {
|
||||
["autoload"] = false,
|
||||
["autosave"] = true,
|
||||
["follow_cwd"] = true,
|
||||
["silent"] = false,
|
||||
["use_git_branch"] = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"project",
|
||||
["config"] = function(_, opts)
|
||||
require("project_nvim").setup(opts)
|
||||
end,
|
||||
["dependencies"] = {
|
||||
{
|
||||
"telescope",
|
||||
["cmd"] = { "Telescope" },
|
||||
["config"] = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
|
||||
for i, extension in ipairs({ "undo", "ui-select", "fzf" }) do
|
||||
telescope.load_extension(extension)
|
||||
end
|
||||
end,
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
{
|
||||
"telescope-fzf-native",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope-fzf-native.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-fzf-native",
|
||||
},
|
||||
{
|
||||
"telescope-undo",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope-undo.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-undo",
|
||||
},
|
||||
{
|
||||
"telescope-ui-select",
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope-ui-select.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-ui-select",
|
||||
},
|
||||
},
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/telescope.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope",
|
||||
["opts"] = {
|
||||
["defaults"] = {
|
||||
["mappings"] = {
|
||||
["i"] = {
|
||||
["<Esc>"] = function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/project.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "project",
|
||||
["opts"] = {
|
||||
["detection_methods"] = { "lsp", "pattern" },
|
||||
["manual_mode"] = false,
|
||||
["patterns"] = { ".git", "Makefile", "CMakeLists.txt", "flake.nix" },
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/dashboard-nvim",
|
||||
@ -359,16 +489,17 @@ require("lazy").setup({
|
||||
["opts"] = {
|
||||
["config"] = {
|
||||
["center"] = {
|
||||
{ ["action"] = "Telescope find_files", ["desc"] = " Find File", ["icon"] = " ", ["key"] = "f" },
|
||||
{ ["action"] = "ene | startinsert", ["desc"] = " New File", ["icon"] = " ", ["key"] = "n" },
|
||||
{ ["action"] = "Telescope oldfiles", ["desc"] = " Recent Files", ["icon"] = " ", ["key"] = "r" },
|
||||
{ ["action"] = "Telescope live_grep", ["desc"] = " Find Text", ["icon"] = " ", ["key"] = "g" },
|
||||
{ ["action"] = "Telescope projects", ["desc"] = " Open Project", ["icon"] = " ", ["key"] = "p" },
|
||||
{
|
||||
["action"] = "lua require('persistence').load()",
|
||||
["action"] = "Telescope persisted",
|
||||
["desc"] = " Restore Session",
|
||||
["icon"] = " ",
|
||||
["key"] = "s",
|
||||
},
|
||||
{ ["action"] = "Telescope find_files", ["desc"] = " Find File", ["icon"] = " ", ["key"] = "f" },
|
||||
{ ["action"] = "Telescope oldfiles", ["desc"] = " Recent Files", ["icon"] = " ", ["key"] = "r" },
|
||||
{ ["action"] = "ene | startinsert", ["desc"] = " New File", ["icon"] = " ", ["key"] = "n" },
|
||||
{ ["action"] = "Telescope live_grep", ["desc"] = " Find Text", ["icon"] = " ", ["key"] = "g" },
|
||||
{ ["action"] = "Lazy", ["desc"] = " Lazy", ["icon"] = " ", ["key"] = "l" },
|
||||
{ ["action"] = "quitall", ["desc"] = " Quit", ["icon"] = " ", ["key"] = "q" },
|
||||
},
|
||||
@ -385,6 +516,13 @@ require("lazy").setup({
|
||||
["theme"] = "doom",
|
||||
},
|
||||
},
|
||||
{
|
||||
"diffview",
|
||||
["cmd"] = { "DiffviewOpen" },
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/diffview.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "diffview",
|
||||
},
|
||||
{
|
||||
"flash",
|
||||
["config"] = function(_, opts)
|
||||
@ -649,6 +787,18 @@ require("lazy").setup({
|
||||
["lazy"] = false,
|
||||
["name"] = "luasnip",
|
||||
},
|
||||
{
|
||||
"narrow-region",
|
||||
["cmd"] = { "NR" },
|
||||
["config"] = function(_, opts)
|
||||
vim.keymap.del("x", "<space>Nr")
|
||||
vim.keymap.del("x", "<space>nr")
|
||||
vim.keymap.del("n", "<space>nr")
|
||||
end,
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/NrrwRgn",
|
||||
["lazy"] = true,
|
||||
["name"] = "narrow-region",
|
||||
},
|
||||
{
|
||||
"navbuddy",
|
||||
["cmd"] = { "Navbuddy" },
|
||||
@ -732,9 +882,15 @@ require("lazy").setup({
|
||||
["name"] = "neo-tree",
|
||||
["opts"] = {
|
||||
["buffers"] = { ["follow_current_file"] = { ["enabled"] = true, ["leave_dirs_open"] = false } },
|
||||
["default_component_configs"] = { ["container"] = { ["enable_character_fade"] = true } },
|
||||
["enable_diagnostics"] = false,
|
||||
["enable_git_status"] = true,
|
||||
["filesystem"] = { ["follow_current_file"] = { ["enabled"] = true, ["leave_dirs_open"] = false } },
|
||||
["filesystem"] = {
|
||||
["bind_to_cwd"] = true,
|
||||
["cwd_target"] = { ["sidebar"] = "global" },
|
||||
["filtered_items"] = { ["visible"] = true },
|
||||
["follow_current_file"] = { ["enabled"] = true, ["leave_dirs_open"] = false },
|
||||
},
|
||||
["open_files_do_not_replace_types"] = { "terminal", "trouble", "qf" },
|
||||
["popup_border_style"] = "rounded",
|
||||
["use_default_mappings"] = false,
|
||||
@ -755,6 +911,7 @@ require("lazy").setup({
|
||||
["x"] = "cut_to_clipboard",
|
||||
["y"] = "copy_to_clipboard",
|
||||
},
|
||||
["position"] = "left",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -910,6 +1067,18 @@ require("lazy").setup({
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "todo-comments",
|
||||
["opts"] = {
|
||||
["keywords"] = {
|
||||
["FIX"] = { ["alt"] = { "FIXME", "BUG", "FIXIT", "ISSUE" }, ["color"] = "error", ["icon"] = " " },
|
||||
["HACK"] = { ["color"] = "warning", ["icon"] = " " },
|
||||
["NOTE"] = { ["alt"] = { "INFO" }, ["color"] = "hint", ["icon"] = " " },
|
||||
["PERF"] = { ["alt"] = { "OPTIM", "PERFORMANCE", "OPTIMIZE" }, ["icon"] = " " },
|
||||
["TEST"] = { ["alt"] = { "TESTING", "PASSED", "FAILED" }, ["color"] = "test", ["icon"] = "⏲ " },
|
||||
["TODO"] = { ["color"] = "info", ["icon"] = " " },
|
||||
["WARN"] = { ["alt"] = { "WARNING", "XXX" }, ["color"] = "warning", ["icon"] = " " },
|
||||
},
|
||||
["signs"] = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"toggleterm",
|
||||
@ -923,6 +1092,7 @@ require("lazy").setup({
|
||||
["name"] = "toggleterm",
|
||||
["opts"] = {
|
||||
["auto_scroll"] = true,
|
||||
["autochdir"] = true,
|
||||
["close_on_exit"] = true,
|
||||
["direction"] = "horizontal",
|
||||
["float_opts"] = { ["border"] = "curved", ["height"] = 20, ["width"] = 80, ["winblend"] = 0 },
|
||||
@ -1005,6 +1175,14 @@ require("lazy").setup({
|
||||
["lazy"] = false,
|
||||
["name"] = "ufo",
|
||||
},
|
||||
{
|
||||
"vimtex",
|
||||
["config"] = function(_, opts)
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
end,
|
||||
["dir"] = "/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store/lazy-plugins/vimtex",
|
||||
["name"] = "vimtex",
|
||||
},
|
||||
{
|
||||
"which-key",
|
||||
["config"] = function(_, opts)
|
||||
@ -1155,7 +1333,7 @@ do
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>nohlsearch<cr>",
|
||||
["key"] = "<C-h>",
|
||||
["key"] = "<C-S-h>",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Clear search highlights" },
|
||||
},
|
||||
@ -1173,18 +1351,6 @@ do
|
||||
},
|
||||
{ ["action"] = "<Esc>", ["key"] = ";", ["mode"] = "v", ["options"] = { ["desc"] = "Exit visual mode" } },
|
||||
{ ["action"] = "<cmd>Lazy<cr>", ["key"] = "<leader>L", ["mode"] = "n", ["options"] = { ["desc"] = "Show Lazy" } },
|
||||
{
|
||||
["action"] = "<cmd>w<cr>",
|
||||
["key"] = "<leader>s",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Save current buffer" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>wa<cr>",
|
||||
["key"] = "<leader>S",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Save all buffers" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>edit!<cr>",
|
||||
["key"] = "<leader>R",
|
||||
@ -1203,6 +1369,18 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Find file" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>Telescope projects<cr>",
|
||||
["key"] = "<leader>p",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Open project" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>Telescope persisted<cr>",
|
||||
["key"] = "<leader>s",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Restore session" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>Telescope vim_options<cr>",
|
||||
["key"] = "<leader>o",
|
||||
@ -1221,9 +1399,10 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Find in working directory" },
|
||||
},
|
||||
{ ["action"] = ":NR!<cr>", ["key"] = "<leader>n", ["mode"] = "v", ["options"] = { ["desc"] = "Narrow region" } },
|
||||
{
|
||||
["action"] = "<cmd>Telescope notify<cr>",
|
||||
["key"] = "<leader>n",
|
||||
["key"] = "<leader>N",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show notify history" },
|
||||
},
|
||||
@ -1269,6 +1448,12 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show help tags" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>TodoTelescope<cr>",
|
||||
["key"] = "<leader>T",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show TODOs" },
|
||||
},
|
||||
{ ["action"] = "+quit", ["key"] = "<leader>q", ["mode"] = "n" },
|
||||
{ ["action"] = "<cmd>quitall<cr>", ["key"] = "<leader>qq", ["mode"] = "n", ["options"] = { ["desc"] = "Quit" } },
|
||||
{
|
||||
@ -1347,10 +1532,16 @@ do
|
||||
["options"] = { ["desc"] = "Toggle NavBuddy" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>TroubleToggle focus=false<cr>",
|
||||
["action"] = "<cmd>TroubleToggle workspace_diagnostics focus=false<cr>",
|
||||
["key"] = "<leader>td",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Toggle Trouble" },
|
||||
["options"] = { ["desc"] = "Toggle Trouble diagnostics" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>TroubleToggle todo focus=false<cr>",
|
||||
["key"] = "<leader>tT",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Toggle Trouble TODOs" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>ToggleAutoformat<cr>",
|
||||
@ -1413,6 +1604,12 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show Git log for current file" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>DiffviewOpen<cr>",
|
||||
["key"] = "<leader>gd",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show Git diff for current worktree" },
|
||||
},
|
||||
{ ["action"] = "+lsp", ["key"] = "<leader>l", ["mode"] = "n" },
|
||||
{
|
||||
["action"] = "<cmd>Telescope lsp_references<cr>",
|
||||
@ -1470,7 +1667,7 @@ do
|
||||
["options"] = { ["desc"] = "Show diagnostics" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>lua vim.lsp.buf.rename()<cr>",
|
||||
["action"] = ":IncRename ",
|
||||
["key"] = "<leader>cr",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Rename LSP symbol" },
|
||||
|
||||
@ -72,7 +72,7 @@ vim.cmd([[
|
||||
]])
|
||||
require("lazy").setup({
|
||||
dev = {
|
||||
path = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins",
|
||||
path = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins",
|
||||
patterns = { "." },
|
||||
fallback = false,
|
||||
},
|
||||
@ -87,7 +87,7 @@ require("lazy").setup({
|
||||
colorscheme catppuccin
|
||||
]])
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/catppuccin-nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/catppuccin-nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "catppuccin",
|
||||
["opts"] = { ["background"] = { ["dark"] = "mocha", ["light"] = "latte" }, ["flavour"] = "mocha" },
|
||||
@ -98,7 +98,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("nvim-web-devicons").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-web-devicons",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-web-devicons",
|
||||
["lazy"] = true,
|
||||
["name"] = "web-devicons",
|
||||
},
|
||||
@ -107,7 +107,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-autopairs",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-autopairs",
|
||||
["event"] = { "InsertEnter" },
|
||||
["lazy"] = true,
|
||||
["name"] = "autopairs",
|
||||
@ -116,7 +116,7 @@ require("lazy").setup({
|
||||
{
|
||||
"bbye",
|
||||
["cmd"] = { "Bdelete", "Bwipeout" },
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/vim-bbye",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/vim-bbye",
|
||||
["lazy"] = true,
|
||||
["name"] = "bbye",
|
||||
},
|
||||
@ -125,7 +125,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("better_escape").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/better-escape.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/better-escape.nvim",
|
||||
["event"] = { "InsertEnter" },
|
||||
["lazy"] = true,
|
||||
["name"] = "better-escape",
|
||||
@ -136,7 +136,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("clangd_extensions").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/clangd_extensions.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/clangd_extensions.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "clangd-extensions",
|
||||
["opts"] = { ["inlay_hints"] = { ["inline"] = false } },
|
||||
@ -149,50 +149,50 @@ require("lazy").setup({
|
||||
["dependencies"] = {
|
||||
{
|
||||
"cmp-async-path",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp-async-path",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp-async-path",
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-async-path",
|
||||
},
|
||||
{
|
||||
"cmp-buffer",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp-buffer",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp-buffer",
|
||||
["enabled"] = false,
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-buffer",
|
||||
},
|
||||
{
|
||||
"cmp-cmdline",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp-cmdline",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp-cmdline",
|
||||
["enabled"] = false,
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-cmdline",
|
||||
},
|
||||
{
|
||||
"cmp-emoji",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp-emoji",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp-emoji",
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-emoji",
|
||||
},
|
||||
{
|
||||
"cmp-nvim-lsp",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp-nvim-lsp",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp-nvim-lsp",
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-nvim-lsp",
|
||||
},
|
||||
{
|
||||
"cmp-nvim-lsp-signature-help",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp-nvim-lsp-signature-help",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp-nvim-lsp-signature-help",
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-nvim-lsp-signature-help",
|
||||
},
|
||||
{
|
||||
"cmp-luasnip",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/cmp_luasnip",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/cmp_luasnip",
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp-luasnip",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-cmp",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-cmp",
|
||||
["event"] = { "InsertEnter" },
|
||||
["lazy"] = true,
|
||||
["name"] = "cmp",
|
||||
@ -276,12 +276,12 @@ require("lazy").setup({
|
||||
|
||||
require("ts_context_commentstring").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-ts-context-commentstring",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-ts-context-commentstring",
|
||||
["lazy"] = true,
|
||||
["name"] = "ts-context-commentstring",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/comment.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/comment.nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "comment",
|
||||
["opts"] = {
|
||||
@ -298,7 +298,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("conform").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/conform.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/conform.nvim",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "conform",
|
||||
@ -338,37 +338,168 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("nvim-web-devicons").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-web-devicons",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-web-devicons",
|
||||
["lazy"] = true,
|
||||
["name"] = "web-devicons",
|
||||
},
|
||||
{
|
||||
"persistence",
|
||||
"persisted",
|
||||
["config"] = function(_, opts)
|
||||
require("persistence").setup(opts)
|
||||
require("persisted").setup(opts)
|
||||
|
||||
require("telescope").load_extension("persisted")
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/persistence.nvim",
|
||||
["dependencies"] = {
|
||||
{
|
||||
"telescope",
|
||||
["cmd"] = { "Telescope" },
|
||||
["config"] = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
|
||||
for i, extension in ipairs({ "undo", "ui-select", "fzf" }) do
|
||||
telescope.load_extension(extension)
|
||||
end
|
||||
end,
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
{
|
||||
"telescope-fzf-native",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-fzf-native.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-fzf-native",
|
||||
},
|
||||
{
|
||||
"telescope-undo",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-undo.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-undo",
|
||||
},
|
||||
{
|
||||
"telescope-ui-select",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-ui-select.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-ui-select",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope",
|
||||
["opts"] = {
|
||||
["defaults"] = {
|
||||
["mappings"] = {
|
||||
["i"] = {
|
||||
["<Esc>"] = function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/persisted.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "persistence",
|
||||
["opts"] = { ["options"] = vim.opt.sessionoptions:get() },
|
||||
["name"] = "persisted",
|
||||
["opts"] = {
|
||||
["autoload"] = false,
|
||||
["autosave"] = true,
|
||||
["follow_cwd"] = true,
|
||||
["silent"] = false,
|
||||
["use_git_branch"] = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"project",
|
||||
["config"] = function(_, opts)
|
||||
require("project_nvim").setup(opts)
|
||||
end,
|
||||
["dependencies"] = {
|
||||
{
|
||||
"telescope",
|
||||
["cmd"] = { "Telescope" },
|
||||
["config"] = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
telescope.setup(opts)
|
||||
|
||||
for i, extension in ipairs({ "undo", "ui-select", "fzf" }) do
|
||||
telescope.load_extension(extension)
|
||||
end
|
||||
end,
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
{
|
||||
"telescope-fzf-native",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-fzf-native.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-fzf-native",
|
||||
},
|
||||
{
|
||||
"telescope-undo",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-undo.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-undo",
|
||||
},
|
||||
{
|
||||
"telescope-ui-select",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-ui-select.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-ui-select",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope",
|
||||
["opts"] = {
|
||||
["defaults"] = {
|
||||
["mappings"] = {
|
||||
["i"] = {
|
||||
["<Esc>"] = function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/project.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "project",
|
||||
["opts"] = {
|
||||
["detection_methods"] = { "lsp", "pattern" },
|
||||
["manual_mode"] = false,
|
||||
["patterns"] = { ".git", "Makefile", "CMakeLists.txt", "flake.nix" },
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/dashboard-nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/dashboard-nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "dashboard",
|
||||
["opts"] = {
|
||||
["config"] = {
|
||||
["center"] = {
|
||||
{ ["action"] = "Telescope find_files", ["desc"] = " Find File", ["icon"] = " ", ["key"] = "f" },
|
||||
{ ["action"] = "ene | startinsert", ["desc"] = " New File", ["icon"] = " ", ["key"] = "n" },
|
||||
{ ["action"] = "Telescope oldfiles", ["desc"] = " Recent Files", ["icon"] = " ", ["key"] = "r" },
|
||||
{ ["action"] = "Telescope live_grep", ["desc"] = " Find Text", ["icon"] = " ", ["key"] = "g" },
|
||||
{ ["action"] = "Telescope projects", ["desc"] = " Open Project", ["icon"] = " ", ["key"] = "p" },
|
||||
{
|
||||
["action"] = "lua require('persistence').load()",
|
||||
["action"] = "Telescope persisted",
|
||||
["desc"] = " Restore Session",
|
||||
["icon"] = " ",
|
||||
["key"] = "s",
|
||||
},
|
||||
{ ["action"] = "Telescope find_files", ["desc"] = " Find File", ["icon"] = " ", ["key"] = "f" },
|
||||
{ ["action"] = "Telescope oldfiles", ["desc"] = " Recent Files", ["icon"] = " ", ["key"] = "r" },
|
||||
{ ["action"] = "ene | startinsert", ["desc"] = " New File", ["icon"] = " ", ["key"] = "n" },
|
||||
{ ["action"] = "Telescope live_grep", ["desc"] = " Find Text", ["icon"] = " ", ["key"] = "g" },
|
||||
{ ["action"] = "Lazy", ["desc"] = " Lazy", ["icon"] = " ", ["key"] = "l" },
|
||||
{ ["action"] = "quitall", ["desc"] = " Quit", ["icon"] = " ", ["key"] = "q" },
|
||||
},
|
||||
@ -385,12 +516,19 @@ require("lazy").setup({
|
||||
["theme"] = "doom",
|
||||
},
|
||||
},
|
||||
{
|
||||
"diffview",
|
||||
["cmd"] = { "DiffviewOpen" },
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/diffview.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "diffview",
|
||||
},
|
||||
{
|
||||
"flash",
|
||||
["config"] = function(_, opts)
|
||||
require("flash").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/flash.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/flash.nvim",
|
||||
["keys"] = { "s", "S", "f", "F", "t", "T" },
|
||||
["lazy"] = true,
|
||||
["name"] = "flash",
|
||||
@ -403,7 +541,7 @@ require("lazy").setup({
|
||||
vim.g[k] = v
|
||||
end
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/git-messenger.vim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/git-messenger.vim",
|
||||
["lazy"] = true,
|
||||
["name"] = "gitmessenger",
|
||||
["opts"] = {
|
||||
@ -416,7 +554,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/gitsigns.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/gitsigns.nvim",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "gitsigns",
|
||||
@ -424,7 +562,7 @@ require("lazy").setup({
|
||||
},
|
||||
{
|
||||
"haskell-tools",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/haskell-tools.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/haskell-tools.nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "haskell-tools",
|
||||
},
|
||||
@ -433,7 +571,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("illuminate").configure(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/vim-illuminate",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/vim-illuminate",
|
||||
["event"] = { "BufreadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "illuminate",
|
||||
@ -453,7 +591,7 @@ require("lazy").setup({
|
||||
},
|
||||
{
|
||||
"intellitab",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/intellitab.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/intellitab.nvim",
|
||||
["event"] = { "InsertEnter" },
|
||||
["lazy"] = true,
|
||||
["name"] = "intellitab",
|
||||
@ -463,7 +601,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("nvim-lastplace").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-lastplace",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-lastplace",
|
||||
["lazy"] = false,
|
||||
["name"] = "lastplace",
|
||||
},
|
||||
@ -473,12 +611,12 @@ require("lazy").setup({
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/plenary.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/lazygit.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/lazygit.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "lazygit",
|
||||
},
|
||||
@ -491,7 +629,7 @@ require("lazy").setup({
|
||||
lint[k] = v
|
||||
end
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-lint",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-lint",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "lint",
|
||||
@ -594,12 +732,12 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("lazydev").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/vimplugin-nvim-lazydev",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/vimplugin-nvim-lazydev",
|
||||
["ft"] = { "lua" },
|
||||
["name"] = "lazydev",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-lspconfig",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-lspconfig",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "lspconfig",
|
||||
@ -617,7 +755,7 @@ require("lazy").setup({
|
||||
unhide = false,
|
||||
})
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/lualine.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/lualine.nvim",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "lualine",
|
||||
@ -645,10 +783,22 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("luasnip").config.set_config(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/luasnip",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/luasnip",
|
||||
["lazy"] = false,
|
||||
["name"] = "luasnip",
|
||||
},
|
||||
{
|
||||
"narrow-region",
|
||||
["cmd"] = { "NR" },
|
||||
["config"] = function(_, opts)
|
||||
vim.keymap.del("x", "<space>Nr")
|
||||
vim.keymap.del("x", "<space>nr")
|
||||
vim.keymap.del("n", "<space>nr")
|
||||
end,
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/NrrwRgn",
|
||||
["lazy"] = true,
|
||||
["name"] = "narrow-region",
|
||||
},
|
||||
{
|
||||
"navbuddy",
|
||||
["cmd"] = { "Navbuddy" },
|
||||
@ -682,7 +832,7 @@ require("lazy").setup({
|
||||
-- }
|
||||
-- })
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-navic",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-navic",
|
||||
["lazy"] = true,
|
||||
["name"] = "navic",
|
||||
["opts"] = {
|
||||
@ -693,7 +843,7 @@ require("lazy").setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-navbuddy",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-navbuddy",
|
||||
["lazy"] = true,
|
||||
["name"] = "navbuddy",
|
||||
["opts"] = { ["lsp"] = { ["auto_attach"] = true }, ["window"] = { ["border"] = "rounded" } },
|
||||
@ -707,7 +857,7 @@ require("lazy").setup({
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/plenary.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
@ -716,25 +866,31 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("nvim-web-devicons").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-web-devicons",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-web-devicons",
|
||||
["lazy"] = true,
|
||||
["name"] = "web-devicons",
|
||||
},
|
||||
{
|
||||
"nui",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nui.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nui.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "nui",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/neo-tree.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/neo-tree.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "neo-tree",
|
||||
["opts"] = {
|
||||
["buffers"] = { ["follow_current_file"] = { ["enabled"] = true, ["leave_dirs_open"] = false } },
|
||||
["default_component_configs"] = { ["container"] = { ["enable_character_fade"] = true } },
|
||||
["enable_diagnostics"] = false,
|
||||
["enable_git_status"] = true,
|
||||
["filesystem"] = { ["follow_current_file"] = { ["enabled"] = true, ["leave_dirs_open"] = false } },
|
||||
["filesystem"] = {
|
||||
["bind_to_cwd"] = true,
|
||||
["cwd_target"] = { ["sidebar"] = "global" },
|
||||
["filtered_items"] = { ["visible"] = true },
|
||||
["follow_current_file"] = { ["enabled"] = true, ["leave_dirs_open"] = false },
|
||||
},
|
||||
["open_files_do_not_replace_types"] = { "terminal", "trouble", "qf" },
|
||||
["popup_border_style"] = "rounded",
|
||||
["use_default_mappings"] = false,
|
||||
@ -755,6 +911,7 @@ require("lazy").setup({
|
||||
["x"] = "cut_to_clipboard",
|
||||
["y"] = "copy_to_clipboard",
|
||||
},
|
||||
["position"] = "left",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -770,18 +927,18 @@ require("lazy").setup({
|
||||
vim.notify = require("notify")
|
||||
require("notify").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-notify",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-notify",
|
||||
["lazy"] = true,
|
||||
["name"] = "notify",
|
||||
},
|
||||
{
|
||||
"nui",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nui.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nui.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "nui",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/noice.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/noice.nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "noice",
|
||||
["opts"] = {
|
||||
@ -819,25 +976,25 @@ require("lazy").setup({
|
||||
},
|
||||
{
|
||||
"rainbow-delimiters",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/rainbow-delimiters.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/rainbow-delimiters.nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "rainbow-delimiters",
|
||||
},
|
||||
{
|
||||
"rustaceanvim",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/rustaceanvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/rustaceanvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "rustaceanvim",
|
||||
},
|
||||
{
|
||||
"sandwich",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/vim-sandwich",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/vim-sandwich",
|
||||
["lazy"] = false,
|
||||
["name"] = "sandwich",
|
||||
},
|
||||
{
|
||||
"sleuth",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/vim-sleuth",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/vim-sleuth",
|
||||
["lazy"] = false,
|
||||
["name"] = "sleuth",
|
||||
},
|
||||
@ -855,30 +1012,30 @@ require("lazy").setup({
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/plenary.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
{
|
||||
"telescope-fzf-native",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/telescope-fzf-native.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-fzf-native.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-fzf-native",
|
||||
},
|
||||
{
|
||||
"telescope-undo",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/telescope-undo.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-undo.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-undo",
|
||||
},
|
||||
{
|
||||
"telescope-ui-select",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/telescope-ui-select.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope-ui-select.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope-ui-select",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/telescope.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/telescope.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "telescope",
|
||||
["opts"] = {
|
||||
@ -901,15 +1058,27 @@ require("lazy").setup({
|
||||
["dependencies"] = {
|
||||
{
|
||||
"plenary",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/plenary.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/plenary.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "plenary",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/todo-comments.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/todo-comments.nvim",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "todo-comments",
|
||||
["opts"] = {
|
||||
["keywords"] = {
|
||||
["FIX"] = { ["alt"] = { "FIXME", "BUG", "FIXIT", "ISSUE" }, ["color"] = "error", ["icon"] = " " },
|
||||
["HACK"] = { ["color"] = "warning", ["icon"] = " " },
|
||||
["NOTE"] = { ["alt"] = { "INFO" }, ["color"] = "hint", ["icon"] = " " },
|
||||
["PERF"] = { ["alt"] = { "OPTIM", "PERFORMANCE", "OPTIMIZE" }, ["icon"] = " " },
|
||||
["TEST"] = { ["alt"] = { "TESTING", "PASSED", "FAILED" }, ["color"] = "test", ["icon"] = "⏲ " },
|
||||
["TODO"] = { ["color"] = "info", ["icon"] = " " },
|
||||
["WARN"] = { ["alt"] = { "WARNING", "XXX" }, ["color"] = "warning", ["icon"] = " " },
|
||||
},
|
||||
["signs"] = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"toggleterm",
|
||||
@ -917,12 +1086,13 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("toggleterm").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/toggleterm.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/toggleterm.nvim",
|
||||
["keys"] = { "<C-/>" },
|
||||
["lazy"] = true,
|
||||
["name"] = "toggleterm",
|
||||
["opts"] = {
|
||||
["auto_scroll"] = true,
|
||||
["autochdir"] = true,
|
||||
["close_on_exit"] = true,
|
||||
["direction"] = "horizontal",
|
||||
["float_opts"] = { ["border"] = "curved", ["height"] = 20, ["width"] = 80, ["winblend"] = 0 },
|
||||
@ -949,7 +1119,7 @@ require("lazy").setup({
|
||||
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-treesitter",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-treesitter",
|
||||
["event"] = { "BufReadPost", "BufNewFile" },
|
||||
["lazy"] = true,
|
||||
["name"] = "treesitter",
|
||||
@ -974,7 +1144,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("trim").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/trim.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/trim.nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "trim",
|
||||
},
|
||||
@ -984,7 +1154,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("trouble").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/trouble.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/trouble.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "trouble",
|
||||
},
|
||||
@ -996,21 +1166,29 @@ require("lazy").setup({
|
||||
["dependencies"] = {
|
||||
{
|
||||
"promise",
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/promise-async",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/promise-async",
|
||||
["lazy"] = true,
|
||||
["name"] = "promise",
|
||||
},
|
||||
},
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/nvim-ufo",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/nvim-ufo",
|
||||
["lazy"] = false,
|
||||
["name"] = "ufo",
|
||||
},
|
||||
{
|
||||
"vimtex",
|
||||
["config"] = function(_, opts)
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
end,
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/vimtex",
|
||||
["name"] = "vimtex",
|
||||
},
|
||||
{
|
||||
"which-key",
|
||||
["config"] = function(_, opts)
|
||||
require("which-key").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/which-key.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/which-key.nvim",
|
||||
["lazy"] = false,
|
||||
["name"] = "which-key",
|
||||
["priority"] = 500,
|
||||
@ -1021,7 +1199,7 @@ require("lazy").setup({
|
||||
["config"] = function(_, opts)
|
||||
require("yanky").setup(opts)
|
||||
end,
|
||||
["dir"] = "/nix/store/q1yhbib07zkkwjkj8m741506982vsgfc-lazy-plugins/yanky.nvim",
|
||||
["dir"] = "/nix/store/n0b2m2d300z2r6ifh2c9rwsskha4c22h-lazy-plugins/yanky.nvim",
|
||||
["lazy"] = true,
|
||||
["name"] = "yanky",
|
||||
},
|
||||
@ -1155,7 +1333,7 @@ do
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>nohlsearch<cr>",
|
||||
["key"] = "<C-h>",
|
||||
["key"] = "<C-S-h>",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Clear search highlights" },
|
||||
},
|
||||
@ -1173,18 +1351,6 @@ do
|
||||
},
|
||||
{ ["action"] = "<Esc>", ["key"] = ";", ["mode"] = "v", ["options"] = { ["desc"] = "Exit visual mode" } },
|
||||
{ ["action"] = "<cmd>Lazy<cr>", ["key"] = "<leader>L", ["mode"] = "n", ["options"] = { ["desc"] = "Show Lazy" } },
|
||||
{
|
||||
["action"] = "<cmd>w<cr>",
|
||||
["key"] = "<leader>s",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Save current buffer" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>wa<cr>",
|
||||
["key"] = "<leader>S",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Save all buffers" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>edit!<cr>",
|
||||
["key"] = "<leader>R",
|
||||
@ -1203,6 +1369,18 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Find file" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>Telescope projects<cr>",
|
||||
["key"] = "<leader>p",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Open project" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>Telescope persisted<cr>",
|
||||
["key"] = "<leader>s",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Restore session" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>Telescope vim_options<cr>",
|
||||
["key"] = "<leader>o",
|
||||
@ -1221,9 +1399,10 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Find in working directory" },
|
||||
},
|
||||
{ ["action"] = ":NR!<cr>", ["key"] = "<leader>n", ["mode"] = "v", ["options"] = { ["desc"] = "Narrow region" } },
|
||||
{
|
||||
["action"] = "<cmd>Telescope notify<cr>",
|
||||
["key"] = "<leader>n",
|
||||
["key"] = "<leader>N",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show notify history" },
|
||||
},
|
||||
@ -1269,6 +1448,12 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show help tags" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>TodoTelescope<cr>",
|
||||
["key"] = "<leader>T",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show TODOs" },
|
||||
},
|
||||
{ ["action"] = "+quit", ["key"] = "<leader>q", ["mode"] = "n" },
|
||||
{ ["action"] = "<cmd>quitall<cr>", ["key"] = "<leader>qq", ["mode"] = "n", ["options"] = { ["desc"] = "Quit" } },
|
||||
{
|
||||
@ -1347,10 +1532,16 @@ do
|
||||
["options"] = { ["desc"] = "Toggle NavBuddy" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>TroubleToggle focus=false<cr>",
|
||||
["action"] = "<cmd>TroubleToggle workspace_diagnostics focus=false<cr>",
|
||||
["key"] = "<leader>td",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Toggle Trouble" },
|
||||
["options"] = { ["desc"] = "Toggle Trouble diagnostics" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>TroubleToggle todo focus=false<cr>",
|
||||
["key"] = "<leader>tT",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Toggle Trouble TODOs" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>ToggleAutoformat<cr>",
|
||||
@ -1413,6 +1604,12 @@ do
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show Git log for current file" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>DiffviewOpen<cr>",
|
||||
["key"] = "<leader>gd",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Show Git diff for current worktree" },
|
||||
},
|
||||
{ ["action"] = "+lsp", ["key"] = "<leader>l", ["mode"] = "n" },
|
||||
{
|
||||
["action"] = "<cmd>Telescope lsp_references<cr>",
|
||||
@ -1470,7 +1667,7 @@ do
|
||||
["options"] = { ["desc"] = "Show diagnostics" },
|
||||
},
|
||||
{
|
||||
["action"] = "<cmd>lua vim.lsp.buf.rename()<cr>",
|
||||
["action"] = ":IncRename ",
|
||||
["key"] = "<leader>cr",
|
||||
["mode"] = "n",
|
||||
["options"] = { ["desc"] = "Rename LSP symbol" },
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
name: Bug Report
|
||||
description: File a bug/issue
|
||||
title: "bug: "
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/persistence.nvim) and search [existing issues](https://github.com/folke/persistence.nvim/issues). Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/persistence.nvim/discussions) and will be closed.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Did you check docs and existing issues?
|
||||
description: Make sure you checked all of the below before submitting an issue
|
||||
options:
|
||||
- label: I have read all the persistence.nvim docs
|
||||
required: true
|
||||
- label: I have searched the existing issues of persistence.nvim
|
||||
required: true
|
||||
- label: I have searched the existing issues of plugins related to this issue
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: "Neovim version (nvim -v)"
|
||||
placeholder: "0.8.0 commit db1b0ee3b30f"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: "Operating system/version"
|
||||
placeholder: "MacOS 11.5"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of what the bug is. Please include any related errors you see in Neovim.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
placeholder: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A concise description of what you expected to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Repro
|
||||
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
|
||||
value: |
|
||||
-- DO NOT change the paths and don't remove the colorscheme
|
||||
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", "https://github.com/folke/lazy.nvim.git", lazypath, })
|
||||
end
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
||||
|
||||
-- install plugins
|
||||
local plugins = {
|
||||
"folke/tokyonight.nvim",
|
||||
"folke/persistence.nvim",
|
||||
-- add any other plugins here
|
||||
}
|
||||
require("lazy").setup(plugins, {
|
||||
root = root .. "/plugins",
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("tokyonight")
|
||||
-- add anything else here
|
||||
render: Lua
|
||||
validations:
|
||||
required: false
|
||||
@ -1,36 +0,0 @@
|
||||
name: Feature Request
|
||||
description: Suggest a new feature
|
||||
title: "feature: "
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Did you check the docs?
|
||||
description: Make sure you read all the docs before submitting a feature request
|
||||
options:
|
||||
- label: I have read all the persistence.nvim docs
|
||||
required: true
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
- type: textarea
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots about the feature request here.
|
||||
@ -1,72 +0,0 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
strategy:
|
||||
matrix:
|
||||
# os: [ubuntu-latest, windows-latest]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Neovim
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p /tmp/nvim
|
||||
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
|
||||
cd /tmp/nvim
|
||||
chmod a+x ./nvim.appimage
|
||||
./nvim.appimage --appimage-extract
|
||||
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
|
||||
- name: Run Tests
|
||||
run: |
|
||||
nvim --version
|
||||
[ ! -d tests ] && exit 0
|
||||
nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/init.lua', sequential = true}"
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: tests
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: panvimdoc
|
||||
uses: kdheepak/panvimdoc@main
|
||||
with:
|
||||
vimdoc: persistence.nvim
|
||||
version: "Neovim >= 0.8.0"
|
||||
demojify: true
|
||||
treesitter: true
|
||||
- name: Push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "chore(build): auto-generate vimdoc"
|
||||
commit_user_name: "github-actions[bot]"
|
||||
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
||||
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
||||
release:
|
||||
name: release
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
needs:
|
||||
- docs
|
||||
- tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release
|
||||
with:
|
||||
release-type: simple
|
||||
package-name: persistence.nvim
|
||||
- uses: actions/checkout@v3
|
||||
- name: tag stable versions
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email github-actions[bot]@users.noreply.github.com
|
||||
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
|
||||
git tag -d stable || true
|
||||
git push origin :stable || true
|
||||
git tag -a stable -m "Last Stable Release"
|
||||
git push origin stable
|
||||
@ -1,8 +0,0 @@
|
||||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
@ -1,61 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## [2.0.0](https://github.com/folke/persistence.nvim/compare/v1.2.1...v2.0.0) (2023-10-15)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **start:** session name is now based on the cwd when the session starts and not when the session ends. Fixes #1688
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **start:** session name is now based on the cwd when the session starts and not when the session ends. Fixes [#1688](https://github.com/folke/persistence.nvim/issues/1688) ([0361df7](https://github.com/folke/persistence.nvim/commit/0361df7775f5b4ed51a6d7fe159438573b7f07a6))
|
||||
|
||||
## [1.2.1](https://github.com/folke/persistence.nvim/compare/v1.2.0...v1.2.1) (2023-10-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* dont save the session when only `gitcommit` buffers are present. Fixes [#14](https://github.com/folke/persistence.nvim/issues/14) ([8f7cbcc](https://github.com/folke/persistence.nvim/commit/8f7cbccfb506fe6cb35db9ad966137c363b049c5))
|
||||
|
||||
## [1.2.0](https://github.com/folke/persistence.nvim/compare/v1.1.0...v1.2.0) (2023-10-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* don't save the session when no files are open (save_empty = false) ([e9afeaf](https://github.com/folke/persistence.nvim/commit/e9afeaf3a7bb645ca73980cd13048c48c292500c))
|
||||
|
||||
## [1.1.0](https://github.com/folke/persistence.nvim/compare/v1.0.1...v1.1.0) (2023-02-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **persistence:** `pre_save` option to call before saving ([#22](https://github.com/folke/persistence.nvim/issues/22)) ([f4bb0c5](https://github.com/folke/persistence.nvim/commit/f4bb0c5641a0e6c9ac3675ddd794ca78099d8510))
|
||||
|
||||
## [1.0.1](https://github.com/folke/persistence.nvim/compare/v1.0.0...v1.0.1) (2023-01-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* dont throw error when session was already stopped ([70c281e](https://github.com/folke/persistence.nvim/commit/70c281e54e34630d8bef9b1cf9f7a0ac3edd6a1c))
|
||||
|
||||
## 1.0.0 (2023-01-04)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* save sessions in state instead of config
|
||||
|
||||
### Features
|
||||
|
||||
* added config options ([a39f3f1](https://github.com/folke/persistence.nvim/commit/a39f3f10c836709f9b6e009b20a1f028851c50e0))
|
||||
* inital version ([8b32094](https://github.com/folke/persistence.nvim/commit/8b32094309ee986066c219d2b4d88a4045fbcb8c))
|
||||
* save sessions in state instead of config ([c304745](https://github.com/folke/persistence.nvim/commit/c30474509666187181add6122e775f9978478c81))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* dont show errors when loading a session ([ad7fcd4](https://github.com/folke/persistence.nvim/commit/ad7fcd4fed0cecb9ae3c6cbc4a61801ef4e2466d))
|
||||
* properly escape session file names on Windows ([#7](https://github.com/folke/persistence.nvim/issues/7)) ([83af96b](https://github.com/folke/persistence.nvim/commit/83af96b1f205dddab066c96b029ceeee192b48d4))
|
||||
* renamed session to persistence in autocmds ([38203a1](https://github.com/folke/persistence.nvim/commit/38203a17a97d49bfcc938f171ecfa44f52dda08e))
|
||||
* vim.fn.has('win32') returns 0 or 1, not a boolean ([#8](https://github.com/folke/persistence.nvim/issues/8)) ([77cf5a6](https://github.com/folke/persistence.nvim/commit/77cf5a6ee162013b97237ff25450080401849f85))
|
||||
@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@ -1,61 +0,0 @@
|
||||
# 💾 Persistence
|
||||
|
||||
**Persistence** is a simple lua plugin for automated session management.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- automatically saves the active session under `~/.local/state/nvim/sessions` on exit
|
||||
- simple API to restore the current or last session
|
||||
|
||||
## ⚡️ Requirements
|
||||
|
||||
- Neovim >= 0.7.2
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
Install the plugin with your preferred package manager:
|
||||
|
||||
### [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
|
||||
```lua
|
||||
-- Lua
|
||||
{
|
||||
"folke/persistence.nvim",
|
||||
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
||||
opts = {
|
||||
-- add any custom options here
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
Persistence comes with the following defaults:
|
||||
|
||||
```lua
|
||||
{
|
||||
dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"), -- directory where session files are saved
|
||||
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
|
||||
pre_save = nil, -- a function to call before saving the session
|
||||
post_save = nil, -- a function to call after saving the session
|
||||
save_empty = false, -- don't save if there are no open file buffers
|
||||
pre_load = nil, -- a function to call before loading the session
|
||||
post_load = nil, -- a function to call after loading the session
|
||||
}
|
||||
```
|
||||
|
||||
## 🚀 Usage
|
||||
|
||||
**Persistence** works well with plugins like `startify` or `dashboard`. It will never restore a session automatically,
|
||||
but you can of course write an autocmd that does exactly that if you want.
|
||||
|
||||
```lua
|
||||
-- restore the session for the current directory
|
||||
vim.api.nvim_set_keymap("n", "<leader>qs", [[<cmd>lua require("persistence").load()<cr>]], {})
|
||||
|
||||
-- restore the last session
|
||||
vim.api.nvim_set_keymap("n", "<leader>ql", [[<cmd>lua require("persistence").load({ last = true })<cr>]], {})
|
||||
|
||||
-- stop Persistence => session won't be saved on exit
|
||||
vim.api.nvim_set_keymap("n", "<leader>qd", [[<cmd>lua require("persistence").stop()<cr>]], {})
|
||||
```
|
||||
@ -1,85 +0,0 @@
|
||||
*persistence.nvim.txt* For Neovim >= 0.8.0 Last change: 2024 May 16
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *persistence.nvim-table-of-contents*
|
||||
|
||||
1. Persistence |persistence.nvim-persistence|
|
||||
- Features |persistence.nvim-persistence-features|
|
||||
- Requirements |persistence.nvim-persistence-requirements|
|
||||
- Installation |persistence.nvim-persistence-installation|
|
||||
- Configuration |persistence.nvim-persistence-configuration|
|
||||
- Usage |persistence.nvim-persistence-usage|
|
||||
|
||||
==============================================================================
|
||||
1. Persistence *persistence.nvim-persistence*
|
||||
|
||||
**Persistence** is a simple lua plugin for automated session management.
|
||||
|
||||
|
||||
FEATURES *persistence.nvim-persistence-features*
|
||||
|
||||
- automatically saves the active session under `~/.local/state/nvim/sessions` on exit
|
||||
- simple API to restore the current or last session
|
||||
|
||||
|
||||
REQUIREMENTS *persistence.nvim-persistence-requirements*
|
||||
|
||||
- Neovim >= 0.7.2
|
||||
|
||||
|
||||
INSTALLATION *persistence.nvim-persistence-installation*
|
||||
|
||||
Install the plugin with your preferred package manager:
|
||||
|
||||
|
||||
LAZY.NVIM ~
|
||||
|
||||
>lua
|
||||
-- Lua
|
||||
{
|
||||
"folke/persistence.nvim",
|
||||
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
||||
opts = {
|
||||
-- add any custom options here
|
||||
}
|
||||
}
|
||||
<
|
||||
|
||||
|
||||
CONFIGURATION *persistence.nvim-persistence-configuration*
|
||||
|
||||
Persistence comes with the following defaults:
|
||||
|
||||
>lua
|
||||
{
|
||||
dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"), -- directory where session files are saved
|
||||
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
|
||||
pre_save = nil, -- a function to call before saving the session
|
||||
post_save = nil, -- a function to call after saving the session
|
||||
save_empty = false, -- don't save if there are no open file buffers
|
||||
pre_load = nil, -- a function to call before loading the session
|
||||
post_load = nil, -- a function to call after loading the session
|
||||
}
|
||||
<
|
||||
|
||||
|
||||
USAGE *persistence.nvim-persistence-usage*
|
||||
|
||||
**Persistence** works well with plugins like `startify` or `dashboard`. It will
|
||||
never restore a session automatically, but you can of course write an autocmd
|
||||
that does exactly that if you want.
|
||||
|
||||
>lua
|
||||
-- restore the session for the current directory
|
||||
vim.api.nvim_set_keymap("n", "<leader>qs", [[<cmd>lua require("persistence").load()<cr>]], {})
|
||||
|
||||
-- restore the last session
|
||||
vim.api.nvim_set_keymap("n", "<leader>ql", [[<cmd>lua require("persistence").load({ last = true })<cr>]], {})
|
||||
|
||||
-- stop Persistence => session won't be saved on exit
|
||||
vim.api.nvim_set_keymap("n", "<leader>qd", [[<cmd>lua require("persistence").stop()<cr>]], {})
|
||||
<
|
||||
|
||||
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
@ -1,8 +0,0 @@
|
||||
persistence.nvim-persistence persistence.nvim.txt /*persistence.nvim-persistence*
|
||||
persistence.nvim-persistence-configuration persistence.nvim.txt /*persistence.nvim-persistence-configuration*
|
||||
persistence.nvim-persistence-features persistence.nvim.txt /*persistence.nvim-persistence-features*
|
||||
persistence.nvim-persistence-installation persistence.nvim.txt /*persistence.nvim-persistence-installation*
|
||||
persistence.nvim-persistence-requirements persistence.nvim.txt /*persistence.nvim-persistence-requirements*
|
||||
persistence.nvim-persistence-usage persistence.nvim.txt /*persistence.nvim-persistence-usage*
|
||||
persistence.nvim-table-of-contents persistence.nvim.txt /*persistence.nvim-table-of-contents*
|
||||
persistence.nvim.txt persistence.nvim.txt /*persistence.nvim.txt*
|
||||
@ -1,22 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
---@class PersistenceOptions
|
||||
---@field pre_save? fun()
|
||||
---@field post_save? fun()
|
||||
---@field pre_load? fun()
|
||||
---@field post_load? fun()
|
||||
local defaults = {
|
||||
dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"), -- directory where session files are saved
|
||||
options = { "buffers", "curdir", "tabpages", "winsize", "skiprtp" }, -- sessionoptions used for saving
|
||||
save_empty = false, -- don't save if there are no open file buffers
|
||||
}
|
||||
|
||||
---@type PersistenceOptions
|
||||
M.options = {}
|
||||
|
||||
function M.setup(opts)
|
||||
M.options = vim.tbl_deep_extend("force", {}, defaults, opts or {})
|
||||
vim.fn.mkdir(M.options.dir, "p")
|
||||
end
|
||||
|
||||
return M
|
||||
@ -1,99 +0,0 @@
|
||||
local Config = require("persistence.config")
|
||||
|
||||
local M = {}
|
||||
---@type string?
|
||||
M.current = nil
|
||||
|
||||
local e = vim.fn.fnameescape
|
||||
|
||||
function M.get_current()
|
||||
local pattern = "/"
|
||||
if vim.fn.has("win32") == 1 then
|
||||
pattern = "[\\:]"
|
||||
end
|
||||
local name = vim.fn.getcwd():gsub(pattern, "%%")
|
||||
return Config.options.dir .. name .. ".vim"
|
||||
end
|
||||
|
||||
function M.get_last()
|
||||
local sessions = M.list()
|
||||
table.sort(sessions, function(a, b)
|
||||
return vim.loop.fs_stat(a).mtime.sec > vim.loop.fs_stat(b).mtime.sec
|
||||
end)
|
||||
return sessions[1]
|
||||
end
|
||||
|
||||
function M.setup(opts)
|
||||
Config.setup(opts)
|
||||
M.start()
|
||||
end
|
||||
|
||||
function M.start()
|
||||
M.current = M.get_current()
|
||||
vim.api.nvim_create_autocmd("VimLeavePre", {
|
||||
group = vim.api.nvim_create_augroup("persistence", { clear = true }),
|
||||
callback = function()
|
||||
if Config.options.pre_save then
|
||||
Config.options.pre_save()
|
||||
end
|
||||
|
||||
if not Config.options.save_empty then
|
||||
local bufs = vim.tbl_filter(function(b)
|
||||
if vim.bo[b].buftype ~= "" then
|
||||
return false
|
||||
end
|
||||
if vim.bo[b].filetype == "gitcommit" then
|
||||
return false
|
||||
end
|
||||
if vim.bo[b].filetype == "gitrebase" then
|
||||
return false
|
||||
end
|
||||
return vim.api.nvim_buf_get_name(b) ~= ""
|
||||
end, vim.api.nvim_list_bufs())
|
||||
if #bufs == 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
M.save()
|
||||
|
||||
if type(Config.options.post_save) == "function" then
|
||||
Config.options.post_save()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
function M.stop()
|
||||
M.current = nil
|
||||
pcall(vim.api.nvim_del_augroup_by_name, "persistence")
|
||||
end
|
||||
|
||||
function M.save()
|
||||
local tmp = vim.o.sessionoptions
|
||||
vim.o.sessionoptions = table.concat(Config.options.options, ",")
|
||||
vim.cmd("mks! " .. e(M.current or M.get_current()))
|
||||
vim.o.sessionoptions = tmp
|
||||
end
|
||||
|
||||
function M.load(opt)
|
||||
opt = opt or {}
|
||||
local sfile = opt.last and M.get_last() or M.get_current()
|
||||
if sfile and vim.fn.filereadable(sfile) ~= 0 then
|
||||
if type(Config.options.pre_load) == "function" then
|
||||
Config.options.pre_load()
|
||||
end
|
||||
|
||||
vim.cmd("silent! source " .. e(sfile))
|
||||
|
||||
if type(Config.options.post_load) == "function" then
|
||||
Config.options.post_load()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M.list()
|
||||
return vim.fn.glob(Config.options.dir .. "*.vim", true, true)
|
||||
end
|
||||
|
||||
return M
|
||||
@ -1 +0,0 @@
|
||||
std="lua51+vim"
|
||||
@ -1,3 +0,0 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
@ -1,2 +0,0 @@
|
||||
[vim]
|
||||
any = true
|
||||
Reference in New Issue
Block a user