feat: option to disable all default keymaps (#16)
This commit is contained in:
parent
972ee81179
commit
28da68ac5c
1 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,8 @@ local default_config = {
|
|||
["~"] = "actions.tcd",
|
||||
["g."] = "actions.toggle_hidden",
|
||||
},
|
||||
-- Set to false to disable all of the above keymaps
|
||||
use_default_keymaps = true,
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = false,
|
||||
|
|
@ -71,6 +73,9 @@ local M = {}
|
|||
|
||||
M.setup = function(opts)
|
||||
local new_conf = vim.tbl_deep_extend("keep", opts or {}, default_config)
|
||||
if not new_conf.use_default_keymaps then
|
||||
new_conf.keymaps = opts.keymaps
|
||||
end
|
||||
|
||||
for k, v in pairs(new_conf) do
|
||||
M[k] = v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue