feat: mini.files close on file open for l and enter

This commit is contained in:
antoine 2026-04-19 12:05:14 +02:00
parent 7c6161c6ac
commit 380ca69046
Signed by: antoine
GPG key ID: 9EB6BAADC51B6133

View file

@ -11,6 +11,21 @@
require("mini.icons").mock_nvim_web_devicons()
'';
luaConfigRC.mini-files-close-on-open = ''
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesBufferCreate",
callback = function(args)
local map = function(key)
vim.keymap.set("n", key, function()
MiniFiles.go_in({ close_on_file = true })
end, { buffer = args.data.buf_id })
end
map("l")
map("<CR>")
end,
})
'';
binds.whichKey = {
enable = true;
setupOpts.delay = 300;