markdown-preview.nvim
markdown-preview.nvim copied to clipboard
Support: Can we get mdx support?
MDX Support
I have setup my blog using mdx. I thought mdx
is supported by this plugin. But sadly it doesn't.
Can we get MDX support?
Waiting the same :3
All you need to do is let nvim assign the markdown
filetype to the mdx
files. One way to do this is to create a ~/.config/nvim/after/ftdetect/mdx.lua
file with the following contents:
local mdx_id = vim.api.nvim_create_augroup("mdx", {
clear = false
})
vim.api.nvim_create_autocmd("BufEnter", {
group = mdx_id,
pattern = "*.mdx",
callback = function()
vim.o.filetype = "markdown"
end
})
not sure if it's the right way, but this is what i did:
vim.cmd([[autocmd BufNewFile,BufRead *.mdx set filetype=markdown]])