dotfiles/home/private_dot_config/nvim/lua/plugins/language/markdown.lua

54 lines
1.3 KiB
Lua
Raw Normal View History

2023-12-17 23:26:30 -06:00
return {
2024-06-13 13:22:15 -05:00
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 = {},
},
2024-07-24 14:14:13 -05:00
},
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,
2024-07-24 14:14:13 -05:00
},
2023-12-17 23:26:30 -06:00
}