Disable some binds for oil.nvim

This commit is contained in:
pro100ton 2025-01-13 12:26:18 +03:00
parent 969288d942
commit e0831aaedc

View file

@ -1,28 +1,31 @@
return { return {
'stevearc/oil.nvim', "stevearc/oil.nvim",
---@module 'oil' ---@module 'oil'
---@type oil.SetupOpts ---@type oil.SetupOpts
opts = { opts = {
keymaps = { keymaps = {
["g?"] = "actions.show_help", ["g?"] = "actions.show_help",
["<CR>"] = "actions.select", ["<CR>"] = "actions.select",
["<C-s>"] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, ["<C-s>"] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" },
["<C-h>"] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, ["<C-h>"] = false,
["<C-t>"] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" }, ["<C-t>"] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" },
["<C-p>"] = "actions.preview", ["<C-p>"] = "actions.preview",
["<C-c>"] = "actions.close", ["<C-c>"] = "actions.close",
["<C-l>"] = "actions.refresh", ["<C-l>"] = false,
["-"] = "actions.parent", ["-"] = "actions.parent",
["_"] = "actions.open_cwd", ["_"] = "actions.open_cwd",
["`"] = "actions.cd", ["`"] = "actions.cd",
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" }, ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
["gs"] = "actions.change_sort", ["gs"] = "actions.change_sort",
["gx"] = "actions.open_external", ["gx"] = "actions.open_external",
["g."] = "actions.toggle_hidden", ["g."] = "actions.toggle_hidden",
["g\\"] = "actions.toggle_trash", ["g\\"] = "actions.toggle_trash",
}, },
}, view_options = {
-- Optional dependencies show_hidden = true,
dependencies = { { "echasnovski/mini.icons", opts = {} } }, },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons },
-- Optional dependencies
dependencies = { { "echasnovski/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
} }