91 lines
2.5 KiB
Lua
91 lines
2.5 KiB
Lua
-- Editor enhancements - Snacks explorer configuration
|
|
-- Custom keybindings for file explorer (snacks.nvim built into LazyVim)
|
|
|
|
return {
|
|
-- Configure snacks.nvim explorer (already included in LazyVim)
|
|
{
|
|
"folke/snacks.nvim",
|
|
opts = {
|
|
explorer = {
|
|
replace_netrw = true,
|
|
},
|
|
picker = {
|
|
sources = {
|
|
explorer = {
|
|
-- Explorer picker configuration
|
|
hidden = true,
|
|
ignored = true, -- Show files ignored by .gitignore
|
|
follow_file = true,
|
|
-- Custom keymaps within the explorer
|
|
win = {
|
|
list = {
|
|
keys = {
|
|
-- Ctrl+Shift+v - Open in vertical split
|
|
["<C-S-v>"] = { "edit_vsplit", mode = { "n", "i" } },
|
|
-- Ctrl+Shift+h - Open in horizontal split
|
|
["<C-S-h>"] = { "edit_split", mode = { "n", "i" } },
|
|
-- Alternative mappings (in case terminal doesn't send Ctrl+Shift properly)
|
|
["<C-v>"] = { "edit_vsplit", mode = { "n", "i" } },
|
|
["<C-x>"] = { "edit_split", mode = { "n", "i" } },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
keys = {
|
|
-- Ctrl+Shift+e - Toggle explorer
|
|
{ "<C-S-e>", function() Snacks.explorer() end, desc = "Toggle Explorer" },
|
|
-- Alternative binding if terminal doesn't handle Ctrl+Shift
|
|
{ "<leader>fe", function() Snacks.explorer() end, desc = "File Explorer" },
|
|
},
|
|
},
|
|
|
|
-- Which-key for keybinding hints
|
|
{
|
|
"folke/which-key.nvim",
|
|
opts = {
|
|
spec = {
|
|
{ "<leader>a", group = "AI" },
|
|
{ "<leader>d", group = "Debug/Database" },
|
|
{ "<leader>t", group = "Terminal" },
|
|
},
|
|
},
|
|
},
|
|
|
|
-- Better terminal integration
|
|
{
|
|
"akinsho/toggleterm.nvim",
|
|
version = "*",
|
|
opts = {
|
|
size = function(term)
|
|
if term.direction == "horizontal" then
|
|
return 15
|
|
elseif term.direction == "vertical" then
|
|
return vim.o.columns * 0.4
|
|
end
|
|
end,
|
|
open_mapping = [[<c-\>]],
|
|
hide_numbers = true,
|
|
shade_filetypes = {},
|
|
shade_terminals = true,
|
|
shading_factor = 2,
|
|
start_in_insert = true,
|
|
insert_mappings = true,
|
|
persist_size = true,
|
|
direction = "float",
|
|
close_on_exit = true,
|
|
shell = vim.o.shell,
|
|
float_opts = {
|
|
border = "curved",
|
|
winblend = 0,
|
|
highlights = {
|
|
border = "Normal",
|
|
background = "Normal",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|