feat(snacks): use toggle

This commit is contained in:
Folke Lemaitre 2024-11-05 00:21:08 +01:00
parent a3070f3c08
commit 8ffbc98161
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 58 additions and 208 deletions

View file

@ -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,
},
}