diff --git a/lazy-lock.json b/lazy-lock.json index 2d34ae8..1f7c004 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -19,6 +19,7 @@ "mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" }, "mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" }, "mini.pairs": { "branch": "main", "commit": "b316e68f2d242d5bd010deaab645daa27ed86297" }, + "neo-tree.nvim": { "branch": "main", "commit": "a981ef287503c668434bffa78071d5b9ff92c12f" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-lint": { "branch": "master", "commit": "d1118791070d090777398792a73032a0ca5c79ff" }, diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua new file mode 100644 index 0000000..a1c6e04 --- /dev/null +++ b/lua/plugins/snacks.lua @@ -0,0 +1,40 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + bigfile = { enabled = true }, + dashboard = { enabled = true }, + explorer = { enabled = true}, + indent = { enabled = true }, + input = { enabled = true }, + picker = { + enabled = true, + sources = { + explorer = { + layout = function() + return { + preset = "sidebar", + preview = false, + layout = { + width = (vim.g.explorer_size or {}).width or 32, -- 默认40 + }, + } + end, + on_close = function(picker) + vim.g.explorer_size = picker.layout.root:size() -- 关闭时保存尺寸 + end, + }, + }, + }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + scope = { enabled = true }, + scroll = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + }, +}