mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +00:00
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:
parent
aa2c43633a
commit
92ff787e73
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