updates for lazyvim v13 and move to snacks
This commit is contained in:
parent
1b0c04b13f
commit
02aadf8483
1 changed files with 30 additions and 32 deletions
|
@ -18,38 +18,36 @@ return {
|
||||||
vim.cmd([[do FileType]])
|
vim.cmd([[do FileType]])
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
{
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
"MeanderingProgrammer/markdown.nvim",
|
opts = {
|
||||||
opts = {
|
code = {
|
||||||
file_types = { "markdown", "norg", "rmd", "org" },
|
sign = false,
|
||||||
code = {
|
width = "block",
|
||||||
sign = false,
|
right_pad = 1,
|
||||||
width = "block",
|
},
|
||||||
right_pad = 1,
|
heading = {
|
||||||
},
|
sign = false,
|
||||||
heading = {
|
icons = {},
|
||||||
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,
|
||||||
},
|
},
|
||||||
ft = { "markdown", "norg", "rmd", "org" },
|
|
||||||
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…
Reference in a new issue