mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
chore(render-markdown): use API to toggle
## Details
The `state` module in `render-markdown` is not expected to be accessed
outside of the package and may be refactored in the future.
Prevent any breaking changes in LazyVim by using the public API which
was updated here:
accaa600ba
This commit is contained in:
parent
2f76d572a2
commit
bd52d63a2c
1 changed files with 2 additions and 11 deletions
|
|
@ -113,17 +113,8 @@ return {
|
|||
require("render-markdown").setup(opts)
|
||||
Snacks.toggle({
|
||||
name = "Render Markdown",
|
||||
get = function()
|
||||
return require("render-markdown.state").enabled
|
||||
end,
|
||||
set = function(enabled)
|
||||
local m = require("render-markdown")
|
||||
if enabled then
|
||||
m.enable()
|
||||
else
|
||||
m.disable()
|
||||
end
|
||||
end,
|
||||
get = require("render-markdown").get,
|
||||
set = require("render-markdown").set,
|
||||
}):map("<leader>um")
|
||||
end,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue