https://github.com/davidmh/mdx.nvim
Good enough syntax highlight for MDX in Neovim using Treesitter
https://github.com/davidmh/mdx.nvim
mdx neovim syntax-highlighting tree-sitter
Last synced: 3 months ago
JSON representation
Good enough syntax highlight for MDX in Neovim using Treesitter
- Host: GitHub
- URL: https://github.com/davidmh/mdx.nvim
- Owner: davidmh
- Created: 2024-02-05T05:26:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-05T16:46:00.000Z (6 months ago)
- Last Synced: 2025-12-07T03:36:05.197Z (6 months ago)
- Topics: mdx, neovim, syntax-highlighting, tree-sitter
- Language: Tree-sitter Query
- Homepage:
- Size: 871 KB
- Stars: 77
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mdx.nvim
Good enough syntax highlight for MDX in Neovim using Treesitter.
Highlight support for mdx based in [the post] written by [Phelipe Teles].
## Installation
#### With [lazy.nvim]
```lua
{
"davidmh/mdx.nvim",
dependencies = {"nvim-treesitter/nvim-treesitter"}
}
```
Note that we don't need to call `config` or define `opts`.
#### With [vim-plug]
```vim
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'davidmh/mdx.nvim'
```
#### With [NvChad]
From the NvChad [docs]:
> All NvChad default plugins will have `lazy = true` set. Therefore, if you want
> a plugin to be enabled on startup, change it to `lazy = false`.
Since this plugin only defines a filetype it's safe to let it run on startup.
So setting `lazy = false` is enough.
But if you absolutely need to loaded only when needed, you can use `event = "BufEnter *.mdx"`
[the post]: https://phelipetls.github.io/posts/mdx-syntax-highlight-treesitter-nvim/
[Phelipe Teles]: https://github.com/phelipetls
[lazy.nvim]: https://github.com/folke/lazy.nvim
[vim-plug]: https://github.com/junegunn/vim-plug
[NvChad]: https://github.com/NvChad/NvChad
[docs]: https://nvchad.com/docs/config/plugins