34 lines
933 B
Lua
34 lines
933 B
Lua
return {
|
|
'nvim-treesitter/nvim-treesitter',
|
|
lazy = false,
|
|
build = ':TSUpdate',
|
|
config = function()
|
|
vim.api.nvim_create_autocmd("User", {
|
|
pattern = "TSUpdate",
|
|
callback = function()
|
|
local parsers = require 'nvim-treesitter.parsers'
|
|
parsers.haxe = {
|
|
install_info = {
|
|
url = "https://github.com/vantreeseba/tree-sitter-haxe",
|
|
branch = "main",
|
|
queries = "queries",
|
|
revision = "a25faf5efa842502a326ec803cfbe5a442a11e7c",
|
|
},
|
|
tier = 0,
|
|
}
|
|
end,
|
|
})
|
|
|
|
vim.filetype.add({ extension = { hx = "haxe" } })
|
|
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = "haxe",
|
|
callback = function()
|
|
local language = vim.treesitter.language.get_lang("haxe")
|
|
if language and vim.treesitter.language.add(language) then
|
|
vim.treesitter.start()
|
|
end
|
|
end,
|
|
})
|
|
end,
|
|
}
|