From 6576e75eeb7d0a028638748b2009c5eb0eec720f Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Fri, 26 Jun 2026 05:17:00 -0500 Subject: feat(dir.lua): global "-" default mapping #40426 --- runtime/plugin/dir.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/plugin/dir.lua') diff --git a/runtime/plugin/dir.lua b/runtime/plugin/dir.lua index eea0105c47..f89804dcee 100644 --- a/runtime/plugin/dir.lua +++ b/runtime/plugin/dir.lua @@ -18,6 +18,10 @@ vim.keymap.set('n', '(nvim-dir-reload)', function() require('nvim.dir')._reload() end, { silent = true, desc = 'Reload directory' }) +if vim.fn.mapcheck('-', 'n') == '' and vim.fn.hasmapto('(nvim-dir-up)', 'n') == 0 then + vim.keymap.set('n', '-', '(nvim-dir-up)', { silent = true, desc = 'Open parent directory' }) +end + ---@param buf integer ---@param path string ---@return boolean -- cgit