Files
nvim/after/ftplugin/netrw.lua
Squibid 7c96b43098 kitchen sink...
just gonna put the changes that I can remember making here:
 - replace blink with native completion (omnifunc)
 - remove some unneeded plugins
 - add a misc function for making sure complex bindings don't cause
   flickering
 - remove some stale snippets
 - remove folding (I don't find myself folding that often)
2025-08-02 11:25:38 -04:00

20 lines
741 B
Lua

local map_local = core.misc.map_local
map_local("n", "h", "-", { noremap = false, remap = true }) -- Go up a directory
map_local("n", "l", "<CR>", { noremap = false, remap = true }) -- Go down a directory / open a file
map_local("n", "g.", "gh", { noremap = false, remap = true }) -- Toggle hidden files
map_local("n", "P", "<C-w>z", { noremap = false, remap = true }) -- Close preview window
-- Close netrw only if it isn't the last window
map_local("n", "<esc>", function()
if #vim.api.nvim_tabpage_list_wins(0) > 1 then
vim.api.nvim_win_close(0, false)
end
end)
-- change neovim root
map_local("n", "rt", function()
vim.api.nvim_set_current_dir(vim.b.netrw_curdir)
vim.notify("root dir updated: "..vim.b.netrw_curdir)
end)