Init commit

This commit is contained in:
Archie Fox
2025-07-25 13:09:33 +03:00
commit 7f1d7f48dd
30 changed files with 1469 additions and 0 deletions

121
lua/plugins/snacks.lua Normal file
View File

@@ -0,0 +1,121 @@
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
bigfile = { enabled = true },
dashboard = { enabled = true },
explorer = { enabled = true },
indent = { enabled = true },
input = { enabled = true },
notifier = {
enabled = true,
timeout = 3000,
},
picker = { enabled = true, debug = { scores = true } },
quickfile = { enabled = true },
scope = { enabled = true },
scroll = { enabled = false },
statuscolumn = { enabled = true },
words = { enabled = true },
styles = {
notification = {
-- wo = { wrap = true } -- Wrap notifications
},
},
},
keys = {
{
"<leader>ff",
function()
Snacks.picker.files({ layout = "ivy" })
end,
desc = "Find Files",
},
{
"<M-k>",
function()
Snacks.picker.keymaps({ layout = "vertical" })
end,
desc = "Dashboard",
},
{
"<S-b>",
function()
Snacks.picker.buffers({
on_show = function()
vim.cmd.stopinsert()
end,
finder = "buffers",
format = "buffer",
hidden = false,
unloaded = true,
current = true,
sort_lastused = true,
win = {
input = {
keys = {
["d"] = "bufdelete",
},
},
list = { keys = { ["d"] = "bufdelete" } },
},
layout = "ivy",
})
end,
desc = "[P]Snacks picker buffers",
},
-- LSP
{
"gd",
function()
Snacks.picker.lsp_definitions()
end,
desc = "Goto Definition",
},
{
"gD",
function()
Snacks.picker.lsp_declarations()
end,
desc = "Goto Declaration",
},
{
"gr",
function()
Snacks.picker.lsp_references()
end,
nowait = true,
desc = "References",
},
{
"gI",
function()
Snacks.picker.lsp_implementations()
end,
desc = "Goto Implementation",
},
{
"gy",
function()
Snacks.picker.lsp_type_definitions()
end,
desc = "Goto T[y]pe Definition",
},
{
"<leader>ss",
function()
Snacks.picker.lsp_symbols()
end,
desc = "LSP Symbols",
},
{
"<leader>sS",
function()
Snacks.picker.lsp_workspace_symbols()
end,
desc = "LSP Workspace Symbols",
},
},
}