53 lines
1.3 KiB
Lua
53 lines
1.3 KiB
Lua
return {
|
|
require("util").setup_lang({ treesitter = { "markdown", "markdown_inline" } }),
|
|
-- {
|
|
-- "iamcco/markdown-preview.nvim",
|
|
-- cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
|
-- build = function()
|
|
-- vim.fn["mkdp#util#install"]()
|
|
-- end,
|
|
-- keys = {
|
|
-- {
|
|
-- "<leader>cp",
|
|
-- ft = "markdown",
|
|
-- "<cmd>MarkdownPreviewToggle<cr>",
|
|
-- desc = "Markdown Preview",
|
|
-- },
|
|
-- },
|
|
-- config = function()
|
|
-- vim.cmd([[do FileType]])
|
|
-- end,
|
|
-- },
|
|
{
|
|
"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("<leader>um")
|
|
end,
|
|
},
|
|
}
|