Skip to content

Commit

Permalink
feat(pack): add mdx language pack (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored Aug 5, 2024
1 parent 3c72999 commit be08022
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
1 change: 0 additions & 1 deletion lua/astrocommunity/pack/markdown/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ return {
opts = {
formatters_by_ft = {
markdown = { "prettierd", "prettier", stop_after_first = true },
["markdown.mdx"] = { "prettierd", "prettier", stop_after_first = true },
},
},
},
Expand Down
7 changes: 7 additions & 0 deletions lua/astrocommunity/pack/mdx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MDX Language Pack

This plugin pack does the following:

- Adds `markdown.mdx` filetype
- Adds `mdx_analyzer` language server
- Adds the [Markdown Language Pack](https://github.com/AstroNvim/astrocommunity/tree/main/lua/astrocommunity/pack/markdown)
33 changes: 33 additions & 0 deletions lua/astrocommunity/pack/mdx/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
return {
{ import = "astrocommunity.pack.markdown" },
{
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = { filetypes = { extension = {
mdx = "markdown.mdx",
} } },
},
{
"williamboman/mason-lspconfig.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "mdx_analyzer" })
end,
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "mdx-analyzer" })
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
["markdown.mdx"] = { "prettierd", "prettier", stop_after_first = true },
},
},
},
}

0 comments on commit be08022

Please sign in to comment.