Files
natercio 881a5dadff neovim: fix a bunch of small issues
- snack explorer now opens on the neovim is open at instead of the go
module
- remove obsolete linting stuff
2026-10-27 10:01:02 +00:00

24 lines
747 B
Lua

-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local function toggle_or_focus_explorer()
local explorers = Snacks.picker.get({ source = "explorer" })
local explorer = explorers[1]
if explorer then
if explorer:is_focused() then
explorer:close()
else
explorer:focus()
end
return
end
-- No explorer open; open one at the actual working directory.
-- (inside the explorer, <c-r> toggles between project cwd and module root)
Snacks.explorer()
end
vim.keymap.set("n", "<leader>e", toggle_or_focus_explorer, { desc = "Explorer (toggle/focus)" })