Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "cbf8d285e1462dd24acf3507817be2bbcb035919" },
"mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" },
"mini.icons": { "branch": "main", "commit": "520995f1d75da0e4cc901ee95080b1ff2bc46b94" },
"mini.nvim": { "branch": "main", "commit": "6791615e48801cbf5b2baefadcea77a7760de3f4" },
"neo-tree.nvim": { "branch": "main", "commit": "83e7a2982fd12b9c3d35bc39dd5877cd91a02a61" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"mini.nvim": { "branch": "main", "commit": "a405061478d8027b4e21214d897ce1eb33115792" },
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
Expand Down
6 changes: 2 additions & 4 deletions lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

Purpose
Non-plugin (or minimally coupled) normal-mode maps: terminal escape,
window navigation, Neo-tree toggles, and visual paste without clobbering a register.
window navigation and visual paste without clobbering a register.

Rationale
Keeping these maps here avoids scattering `vim.keymap.set` across plugin
config files and ensures they exist even before lazy.nvim finishes loading.
`<leader>go` (git browse) lives in `config.plugins.snacks`.
Explorer and `<leader>go` live in `config.plugins.snacks`.

See `:help vim.keymap.set()`.
]]
Expand All @@ -30,5 +30,3 @@ vim.keymap.set('n', '<leader>tf', ':ToggleTerm<CR>', { desc = 'Toggle floating t

vim.keymap.set('x', 'p', '"_dP', { noremap = true, silent = true })

vim.keymap.set('n', '<leader>x', '<cmd>Neotree toggle<cr>', { desc = 'NeoTree Toggle' })
vim.keymap.set('n', '<leader>z', '<cmd>Neotree reveal<cr>', { desc = 'NeoTree Reveal' })
47 changes: 0 additions & 47 deletions lua/config/plugins/neo-tree.lua

This file was deleted.

25 changes: 23 additions & 2 deletions lua/config/plugins/snacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Module: config.plugins.snacks

Purpose
folke/snacks.nvim: picker (Telescope replacement), bigfile, quickfile,
input, gitbrowse, and words (LSP reference highlights + / [[ jumps).
folke/snacks.nvim: picker, explorer (replaces neo-tree), bigfile, quickfile,
input, gitbrowse, lazygit, and words.

Rationale
`priority` + `lazy = false` so quickfile can run before VimEnter on
Expand All @@ -24,8 +24,18 @@ return {
},
---@type snacks.Config
opts = {
explorer = {
replace_netrw = true,
},
picker = {
ui_select = true,
sources = {
explorer = {
watch = true,
git_status = true,
git_untracked = true,
},
},
},
bigfile = {},
quickfile = {},
Expand All @@ -39,6 +49,17 @@ return {
config = function()
local picker = Snacks.picker

local function explorer_toggle()
local current = Snacks.picker.current
if current and current.opts.source == 'explorer' then
current:close()
return
end
Snacks.explorer()
end

vim.keymap.set('n', '<leader>x', explorer_toggle, { desc = 'Explorer toggle' })

vim.keymap.set('n', '<leader>sh', picker.help, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sk', picker.keymaps, { desc = '[S]earch [K]eymaps' })
vim.keymap.set('n', '<leader>sf', picker.files, { desc = '[S]earch [F]iles' })
Expand Down
1 change: 0 additions & 1 deletion lua/config/plugins/spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ local mods = {
'config.plugins.indent_line',
'config.plugins.lint',
'config.plugins.autopairs',
'config.plugins.neo-tree',
'config.plugins.kulala',
}

Expand Down