snacks: delegate many of the configuration to lazyvim
This commit is contained in:
parent
dde56b286d
commit
35db9f7ced
|
@ -4,6 +4,7 @@
|
|||
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "a7ad1f6205500d1369382e2e43df4e60eeae7cb6" },
|
||||
"advanced-git-search.nvim": { "branch": "main", "commit": "1c5a10f5c838cfad2c17d7464311d6fb416cb319" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"arrow.nvim": { "branch": "master", "commit": "5438c977e729a29d96bd54c8da3103154e80dbd1" },
|
||||
"before.nvim": { "branch": "master", "commit": "187bafe2792a82d53cdb632971e4113cd703ac53" },
|
||||
"blink.cmp": { "branch": "main", "commit": "8fb9d72ee4e7ce79144df48dad9d58e102053bd3" },
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
"extras": [
|
||||
"lazyvim.plugins.extras.lang.rust",
|
||||
"lazyvim.plugins.extras.lang.toml",
|
||||
"lazyvim.plugins.extras.ui.alpha",
|
||||
"lazyvim.plugins.extras.vscode"
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "7107"
|
||||
"NEWS.md": "7429"
|
||||
},
|
||||
"version": 7
|
||||
}
|
|
@ -1,15 +1,5 @@
|
|||
return {
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
notifier = { enabled = false },
|
||||
quickfile = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
git = { enabled = true },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>z", "<cmd>lua Snacks.lazygit()<cr>", desc = "LazyGit" },
|
||||
{ "<leader>bd", "<cmd>lua Snacks.bufdelete()<cr>", desc = "(Snacks) Delete Buffer" },
|
||||
|
@ -28,34 +18,4 @@ return {
|
|||
desc = "Prev Reference",
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
vim.print = _G.dd -- Override print to use snacks for `:=` command
|
||||
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map "<leader>us"
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map "<leader>uw"
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map "<leader>uL"
|
||||
Snacks.toggle.diagnostics():map "<leader>ud"
|
||||
Snacks.toggle.line_number():map "<leader>ul"
|
||||
Snacks.toggle
|
||||
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
||||
:map "<leader>uc"
|
||||
Snacks.toggle.treesitter():map "<leader>uT"
|
||||
Snacks.toggle
|
||||
.option("background", { off = "light", on = "dark", name = "Dark Background" })
|
||||
:map "<leader>ub"
|
||||
Snacks.toggle.inlay_hints():map "<leader>uh"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue