chore(render-markdown): use API to toggle (#6558)

## Description

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

## Related Issue(s)

None

## Screenshots

N/A

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
Vlad 2025-10-09 04:47:01 -07:00 committed by GitHub
parent aa2c43633a
commit 92ff787e73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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