Add coc basic config, not fully working yet
This commit is contained in:
17
nvim-coc/lua/plugins/utility/markdown-preview.lua
Executable file
17
nvim-coc/lua/plugins/utility/markdown-preview.lua
Executable file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
-- literally the name, previews md in browser
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
build = function(plugin)
|
||||
if vim.fn.executable "npx" then
|
||||
vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")
|
||||
else
|
||||
vim.cmd [[Lazy load markdown-preview.nvim]]
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end
|
||||
end,
|
||||
init = function()
|
||||
if vim.fn.executable "npx" then vim.g.mkdp_filetypes = { "markdown" } end
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user