fix(nvim): MDX treesitter
REF: https://phelipetls.github.io/posts/mdx-syntax-highlight-treesitter-nvim/
This commit is contained in:
parent
f05a829156
commit
7d4f61cff3
3 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue