Skip to content

Commit

Permalink
feat: enable iamcco/markdown-preview.nvim by default
Browse files Browse the repository at this point in the history
If download markdown-preview binary files failed, you can run command "MarkdownPeviewInstall" to download again.

Note: If you are in China, please use proxy to download.
  • Loading branch information
adoyle-h committed Mar 28, 2024
1 parent 235da74 commit 038fc0a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lua/one/plugins/markdown/preview.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
return {
'iamcco/markdown-preview.nvim',
disable = true,
ft = 'markdown',
run = function()
vim.fn['mkdp#util#install']()
end,

commands = {
-- If download MarkdownPeview binary files failed, you can use this command to do it agian.
MarkdownPeviewInstall = function()
local ft = vim.bo.ft
-- change filetype to markdown to load this plugin
vim.bo.ft = 'markdown'
vim.bo.ft = ft
vim.fn['mkdp#util#install']()
end,
},

config = function(config)
for key, value in pairs(config.markdown.preview) do vim.g[key] = value end
end,
Expand Down

0 comments on commit 038fc0a

Please sign in to comment.