explorer:设置宽度。
This commit is contained in:
40
lua/plugins/snacks.lua
Normal file
40
lua/plugins/snacks.lua
Normal file
@@ -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 },
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user