nvim: Add mdx filetype support

Added suport for the mdx filetype. With the mdx.nvim plugin it will be
recognized and applied to `*.mdx` files. The plugin also associates the
markdown parser with it, and adds some queries for mdx features.

Lastly, added mdx to the list of markdown-like languages in our prose
module so plugins like render-markdown also recognize the language and
work with it.
This commit is contained in:
Marty Oehme 2025-10-10 21:56:54 +02:00
parent 36bd07a7e5
commit 30adb52d3c
Signed by: Marty
GPG key ID: 4E535BC19C61886E
2 changed files with 8 additions and 0 deletions

View file

@ -48,6 +48,7 @@
"mason.nvim": { "branch": "main", "commit": "7f265cd6ae56cecdd0aa50c8c73fc593b0604801" },
"mcphub.nvim": { "branch": "main", "commit": "85a7a659fc82da1429a2241ab61e9ce07b3db374" },
"mdeval.nvim": { "branch": "master", "commit": "0e1b248db174a9659a9ab16eb8c90ff3aec55264" },
"mdx.nvim": { "branch": "main", "commit": "464a74be368dce212cff02f6305845dc7f209ab3" },
"mini.base16": { "branch": "main", "commit": "2eb2d2b889a8c861d1a66ec651bd0edb417d5c7f" },
"mini.files": { "branch": "main", "commit": "49c855977e9f4821d1ed8179ed44fe098b93ea2a" },
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },

View file

@ -13,6 +13,7 @@ end
local md_like = {
"markdown",
"mdx",
"djot",
"pandoc",
"quarto",
@ -345,6 +346,12 @@ local prose_plugs = {
branch = "dev",
},
{ "let-def/texpresso.vim", ft = { "tex" } },
{
"davidmh/mdx.nvim",
config = true,
dependencies = { "nvim-treesitter/nvim-treesitter" },
event = { "BufEnter *.mdx" }, -- since the plug itself defines mdx ft
},
}
return prose_plugs