mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 06:27:14 +01:00
add markdown plugin
This commit is contained in:
20
lua/plugins/markdown.lua
Normal file
20
lua/plugins/markdown.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||
---@module 'render-markdown'
|
||||
---@type render.md.UserConfig
|
||||
opts = {},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = vim.api.nvim_create_augroup('markdown.fold', {}),
|
||||
pattern = 'markdown',
|
||||
callback = function()
|
||||
-- sets local folding options for markdown
|
||||
vim.opt_local.foldmethod = 'expr'
|
||||
vim.opt_local.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user