Migrated init.lua into plugin files

This commit is contained in:
Zackarias Montell
2025-12-05 09:54:42 +01:00
parent f0493d2fe2
commit 0121d40df5
22 changed files with 1069 additions and 1131 deletions

View File

@@ -0,0 +1,28 @@
return {
{
'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,
keys = {
{
'<leader>cp',
ft = 'markdown',
'<cmd>MarkdownPreviewToggle<cr>',
desc = 'Markdown Preview',
},
},
},
}