mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 09:18:51 +02:00
refactor(snacks): move snacks specs to ui/util so that they show up in the generated docs
This commit is contained in:
parent
303980d267
commit
ba632c500d
3 changed files with 51 additions and 42 deletions
|
@ -10,16 +10,6 @@ end
|
|||
|
||||
require("lazyvim.config").init()
|
||||
|
||||
-- Terminal Mappings
|
||||
local function term_nav(dir)
|
||||
---@param self snacks.terminal
|
||||
return function(self)
|
||||
return self:is_floating() and "<c-" .. dir .. ">" or vim.schedule(function()
|
||||
vim.cmd.wincmd(dir)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
{ "folke/lazy.nvim", version = "*" },
|
||||
{ "LazyVim/LazyVim", priority = 10000, lazy = false, opts = {}, cond = true, version = "*" },
|
||||
|
@ -27,37 +17,7 @@ return {
|
|||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = function()
|
||||
---@type snacks.Config
|
||||
return {
|
||||
bigfile = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
statuscolumn = { enabled = false }, -- we set this in options.lua
|
||||
scroll = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
terminal = {
|
||||
win = {
|
||||
keys = {
|
||||
nav_h = { "<C-h>", term_nav("h"), desc = "Go to Left Window", expr = true, mode = "t" },
|
||||
nav_j = { "<C-j>", term_nav("j"), desc = "Go to Lower Window", expr = true, mode = "t" },
|
||||
nav_k = { "<C-k>", term_nav("k"), desc = "Go to Upper Window", expr = true, mode = "t" },
|
||||
nav_l = { "<C-l>", term_nav("l"), desc = "Go to Right Window", expr = true, mode = "t" },
|
||||
},
|
||||
},
|
||||
},
|
||||
toggle = { map = LazyVim.safe_keymap_set },
|
||||
words = { enabled = true },
|
||||
}
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>.", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
|
||||
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
|
||||
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
local notify = vim.notify
|
||||
require("snacks").setup(opts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue