mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat: add markdown-preview back
This commit is contained in:
parent
c7f1d33434
commit
93f7a72f91
1 changed files with 9 additions and 21 deletions
|
|
@ -42,35 +42,23 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
-- Markdown preview (requires deno)
|
||||
-- Markdown preview
|
||||
{
|
||||
"toppair/peek.nvim",
|
||||
enabled = function()
|
||||
if vim.fn.executable("deno") == 1 then
|
||||
return true
|
||||
end
|
||||
require("lazyvim.util").warn({
|
||||
"`peek.nvim` requires `deno` to be installed.\n",
|
||||
"To hide this message, install `deno` or disable the `toppair/peek.nvim` plugin.",
|
||||
}, { title = "LazyVim Extras `lang.markdown`" })
|
||||
return false
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
build = "deno task --quiet build:fast",
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "markdown",
|
||||
function()
|
||||
local peek = require("peek")
|
||||
if peek.is_open() then
|
||||
peek.close()
|
||||
else
|
||||
peek.open()
|
||||
end
|
||||
end,
|
||||
"<cmd>MarkdownPreviewToggle<cr>",
|
||||
desc = "Peek (Markdown Preview)",
|
||||
},
|
||||
},
|
||||
opts = { theme = "light" },
|
||||
config = function()
|
||||
vim.cmd([[do FileType]])
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue