fix(nvim): MDX treesitter

REF: https://phelipetls.github.io/posts/mdx-syntax-highlight-treesitter-nvim/
This commit is contained in:
Ahmad Ansori Palembani 2025-04-20 07:22:41 +07:00
parent f05a829156
commit 7d4f61cff3
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
3 changed files with 18 additions and 1 deletions

View file

@ -35,7 +35,8 @@ return {
},
},
config = function (_, opts)
local config = require("nvim-treesitter.parsers").get_parser_configs()
local parsers = require("nvim-treesitter.parsers")
local config = parsers.get_parser_configs()
config.gsp = {
install_info = {
url = "https://git.sr.ht/~mango/tree-sitter-gsp",
@ -63,6 +64,12 @@ return {
[".*/hypr/.*%.conf"] = "hyprlang",
},
})
vim.filetype.add({
extension = {
mdx = "mdx"
}
})
vim.treesitter.language.register("markdown", "mdx")
require("nvim-treesitter.configs").setup(opts)
end
},