diff options
Diffstat (limited to 'public/nvim/.nvim/lua/plugins/lang/markdown.lua')
-rw-r--r-- | public/nvim/.nvim/lua/plugins/lang/markdown.lua | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/public/nvim/.nvim/lua/plugins/lang/markdown.lua b/public/nvim/.nvim/lua/plugins/lang/markdown.lua new file mode 100644 index 0000000..dcacfc7 --- /dev/null +++ b/public/nvim/.nvim/lua/plugins/lang/markdown.lua @@ -0,0 +1,61 @@ +return { + { + "iamcco/markdown-preview.nvim", + build = "cd app && npm install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + end, + ft = { "markdown" }, + }, + + { + "mzlogin/vim-markdown-toc", + init = function() + vim.g.vmt_auto_update_on_save = 0 + vim.g.vmt_dont_insert_fence = 1 + end, + ft = { "markdown" }, + }, + + { + "preservim/vim-markdown", + dependencies = { "godlygeek/tabular" }, + config = function() + vim.g.vim_markdown_conceal_code_blocks = 0 + vim.g.vim_markdown_frontmatter = 1 + vim.g.vim_markdown_strikethrough = 0 + vim.g.vim_markdown_auto_insert_bullets = 0 + vim.g.vim_markdown_new_list_item_indent = 0 + end, + ft = { "markdown" }, + }, + + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts) == "table" then + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { + "markdown_inline", + }) + end + end, + }, + + { + "jose-elias-alvarez/null-ls.nvim", + opts = function(_, opts) + if type(opts) == "table" then + opts.sources = opts.sources or {} + local null_ls = require("null-ls") + vim.list_extend(opts.sources, { + null_ls.builtins.diagnostics.markdownlint_cli2, + null_ls.builtins.diagnostics.vale, + null_ls.builtins.formatting.prettierd.with({ + filetypes = { "markdown" }, + }), + }) + end + end, + }, +} |