初始化dotfiles
This commit is contained in:
36
nvim/lua/plugins/oil.lua
Normal file
36
nvim/lua/plugins/oil.lua
Normal file
@ -0,0 +1,36 @@
|
||||
-- ============================================================================
|
||||
-- 文件浏览器 (oil.nvim)
|
||||
-- 缓冲区编辑模式,像编辑文本一样管理文件
|
||||
-- ============================================================================
|
||||
|
||||
return {
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
keymaps = {
|
||||
["<CR>"] = "actions.select",
|
||||
["<C-p>"] = "actions.preview",
|
||||
["<C-c>"] = "actions.close",
|
||||
["<C-r>"] = "actions.refresh",
|
||||
["<C-h>"] = "actions.toggle_hidden",
|
||||
["g?"] = "actions.show_help",
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
},
|
||||
float = {
|
||||
padding = 2,
|
||||
max_width = 90,
|
||||
border = "rounded",
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "-", "<cmd>Oil<cr>", desc = "打开父目录" },
|
||||
{ "<leader>fe", "<cmd>Oil<cr>", desc = "文件浏览器" },
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user