updated configuration

This commit is contained in:
2026-01-12 23:12:11 -07:00
parent 6d79fde026
commit dc98d50a31
14 changed files with 1219 additions and 224 deletions

View File

@@ -1,78 +1,89 @@
-- Editor enhancements - Snacks explorer configuration
-- Custom keybindings for file explorer (snacks.nvim built into LazyVim)
return {
-- Telescope: show gitignored files
{
"nvim-telescope/telescope.nvim",
opts = {
defaults = {
file_ignore_patterns = {}, -- Don't ignore anything by default
},
pickers = {
find_files = {
hidden = true,
no_ignore = true, -- Include .gitignore files
},
live_grep = {
additional_args = function()
return { "--hidden", "--no-ignore" }
end,
},
},
},
keys = {
-- Override default to include hidden/ignored
{ "<leader>ff", "<cmd>Telescope find_files hidden=true no_ignore=true<cr>", desc = "Find Files (all)" },
{ "<leader>fF", "<cmd>Telescope find_files<cr>", desc = "Find Files (respect gitignore)" },
},
},
-- Configure snacks.nvim explorer (already included in LazyVim)
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
version = false,
---@module 'snacks'
---@type snacks.Config
opts = {
picker = {
hidden = true,
ignored = true,
live = true,
sources = {
files = {
hidden = true,
ignored = true,
},
},
},
explorer = {
ignored = true,
hidden = true,
replace_netrw = true,
},
styles = {
notification = {
wo = {
wrap = 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" } },
},
},
},
},
},
},
},
},
{
"folke/todo-comments.nvim",
optional = true,
keys = {
{
"<leader>st",
function()
Snacks.picker.todo_comments()
end,
desc = "Todo",
-- 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" },
},
{
"<leader>sT",
function()
Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } })
end,
desc = "Todo/Fix/Fixme",
},
},
-- 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",
},
},
},
},