From 92ff787e739a17df6e5ba4c505d3e3521ad47e52 Mon Sep 17 00:00:00 2001 From: Vlad <52591095+MeanderingProgrammer@users.noreply.github.com> Date: Thu, 9 Oct 2025 04:47:01 -0700 Subject: [PATCH] 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: https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/accaa600ba59022171275adf6640dda13004bd6f ## Related Issue(s) None ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/markdown.lua | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 33e9e457..ac5405e3 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -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("um") end, },