From c5cae1f71052a675df21472122ae4dc796b399d3 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 5 Sep 2024 13:32:21 -0400 Subject: [PATCH] feat(markdown-and-latex): add `render-markdown.nvim` (#1193) --- .../render-markdown-nvim/README.md | 5 +++++ .../render-markdown-nvim/init.lua | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 lua/astrocommunity/markdown-and-latex/render-markdown-nvim/README.md create mode 100644 lua/astrocommunity/markdown-and-latex/render-markdown-nvim/init.lua diff --git a/lua/astrocommunity/markdown-and-latex/render-markdown-nvim/README.md b/lua/astrocommunity/markdown-and-latex/render-markdown-nvim/README.md new file mode 100644 index 000000000..e2df84968 --- /dev/null +++ b/lua/astrocommunity/markdown-and-latex/render-markdown-nvim/README.md @@ -0,0 +1,5 @@ +# render-markdown.nvim + +Plugin to improve viewing Markdown files in Neovim + +**Repository:** diff --git a/lua/astrocommunity/markdown-and-latex/render-markdown-nvim/init.lua b/lua/astrocommunity/markdown-and-latex/render-markdown-nvim/init.lua new file mode 100644 index 000000000..a95444a74 --- /dev/null +++ b/lua/astrocommunity/markdown-and-latex/render-markdown-nvim/init.lua @@ -0,0 +1,21 @@ +return { + "MeanderingProgrammer/render-markdown.nvim", + cmd = "RenderMarkdown", + ft = function() + local plugin = require("lazy.core.config").spec.plugins["render-markdown.nvim"] + local opts = require("lazy.core.plugin").values(plugin, "opts", false) + return opts.file_types or { "markdown" } + end, + dependencies = { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = + require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "markdown", "markdown_inline" }) + end + end, + }, + }, + opts = {}, +}