diff --git a/home/private_dot_config/nvim/lua/plugins/language/markdown.lua b/home/private_dot_config/nvim/lua/plugins/language/markdown.lua index b085a57..bb3b8ca 100644 --- a/home/private_dot_config/nvim/lua/plugins/language/markdown.lua +++ b/home/private_dot_config/nvim/lua/plugins/language/markdown.lua @@ -18,38 +18,36 @@ return { vim.cmd([[do FileType]]) end, }, - -{ - "MeanderingProgrammer/markdown.nvim", - opts = { - file_types = { "markdown", "norg", "rmd", "org" }, - code = { - sign = false, - width = "block", - right_pad = 1, - }, - heading = { - sign = false, - icons = {}, + { + "MeanderingProgrammer/render-markdown.nvim", + opts = { + code = { + sign = false, + width = "block", + right_pad = 1, + }, + heading = { + sign = false, + icons = {}, + }, }, + ft = { "markdown", "norg", "rmd", "org" }, + config = function(_, opts) + 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, + }):map("um") + end, }, - ft = { "markdown", "norg", "rmd", "org" }, - config = function(_, opts) - require("render-markdown").setup(opts) - LazyVim.toggle.map("um", { - 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, - }) - end, -} }