mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-17 17:23:24 +02:00
feat(snacks): use toggle
This commit is contained in:
parent
a3070f3c08
commit
8ffbc98161
7 changed files with 58 additions and 208 deletions
|
@ -108,7 +108,7 @@ return {
|
|||
ft = { "markdown", "norg", "rmd", "org" },
|
||||
config = function(_, opts)
|
||||
require("render-markdown").setup(opts)
|
||||
LazyVim.toggle.map("<leader>um", {
|
||||
Snacks.toggle({
|
||||
name = "Render Markdown",
|
||||
get = function()
|
||||
return require("render-markdown.state").enabled
|
||||
|
@ -121,7 +121,7 @@ return {
|
|||
m.disable()
|
||||
end
|
||||
end,
|
||||
})
|
||||
}):map("<leader>um")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ return {
|
|||
end,
|
||||
})
|
||||
|
||||
LazyVim.toggle.map("<leader>ua", {
|
||||
Snacks.toggle({
|
||||
name = "Mini Animate",
|
||||
get = function()
|
||||
return not vim.g.minianimate_disable
|
||||
|
@ -29,7 +29,7 @@ return {
|
|||
set = function(state)
|
||||
vim.g.minianimate_disable = not state
|
||||
end,
|
||||
})
|
||||
}):map("<leader>ua")
|
||||
|
||||
local animate = require("mini.animate")
|
||||
return {
|
||||
|
|
|
@ -4,8 +4,7 @@ return {
|
|||
event = "VeryLazy",
|
||||
opts = function()
|
||||
local tsc = require("treesitter-context")
|
||||
|
||||
LazyVim.toggle.map("<leader>ut", {
|
||||
Snacks.toggle({
|
||||
name = "Treesitter Context",
|
||||
get = tsc.enabled,
|
||||
set = function(state)
|
||||
|
@ -15,8 +14,7 @@ return {
|
|||
tsc.disable()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
}):map("<leader>ut")
|
||||
return { mode = "cursor", max_lines = 3 }
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue