mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
feat(markdown): markdown-render toggle
This commit is contained in:
parent
264abdf9d5
commit
c8d0faf9b1
1 changed files with 17 additions and 1 deletions
|
@ -106,6 +106,22 @@ return {
|
|||
},
|
||||
},
|
||||
ft = { "markdown", "norg", "rmd", "org" },
|
||||
enabled = true,
|
||||
config = function(_, opts)
|
||||
require("render-markdown").setup(opts)
|
||||
LazyVim.toggle.map("<leader>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,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue