diff options
| author | Barrett Ruth <62671086+barrettruth@users.noreply.github.com> | 2026-06-26 05:17:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-26 06:17:00 -0400 |
| commit | 6576e75eeb7d0a028638748b2009c5eb0eec720f (patch) | |
| tree | e41e72c3fd5d2f29a276fd05eea4984279dcefe7 /runtime/plugin/dir.lua | |
| parent | ea0af5985488fe969365355ad4499fe30799394d (diff) | |
| download | rneovim-6576e75eeb7d0a028638748b2009c5eb0eec720f.tar.gz rneovim-6576e75eeb7d0a028638748b2009c5eb0eec720f.tar.bz2 rneovim-6576e75eeb7d0a028638748b2009c5eb0eec720f.zip | |
feat(dir.lua): global "-" default mapping #40426
Diffstat (limited to 'runtime/plugin/dir.lua')
| -rw-r--r-- | runtime/plugin/dir.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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', '<Plug>(nvim-dir-reload)', function() require('nvim.dir')._reload() end, { silent = true, desc = 'Reload directory' }) +if vim.fn.mapcheck('-', 'n') == '' and vim.fn.hasmapto('<Plug>(nvim-dir-up)', 'n') == 0 then + vim.keymap.set('n', '-', '<Plug>(nvim-dir-up)', { silent = true, desc = 'Open parent directory' }) +end + ---@param buf integer ---@param path string ---@return boolean |