tree-sitter-haxe
v0.9.0
Published
A tree sitter parser for haxe.
Downloads
53
Readme
A tree sitter parser for haxe.
I've only testing this using nvim-treesitter.
Use
Install nvim-treesitter.
Clone this repo, and run tree-sitter generate (you may have to install globally).
Once generated, copy the queries to the nvim-treesitter folder
cp queries/* ~/.vim/BUNDLERPATH/nvim-treesitter/queries/haxe
For example if you're using lazy.nvim run:
cp queries/* ~/.local/share/nvim/lazy/nvim-treesitter/queries/haxe
You may have to create the haxe folder.
Add this snippet to your treesitter config or anywhere in your init.lua
:
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.haxe = {
install_info = {
url = "https://github.com/vantreeseba/tree-sitter-haxe",
files = {"src/parser.c"},
-- optional entries:
branch = "main",
},
filetype = "haxe",
}
Open nvim, and run TSInstallFromGrammer haxe
This should get you running.
I still don't get highlighting...
You might have to add the haxe filetype for neovim to be able to associate the grammar to your files. To do this create the appropriate file with:
touch ~/.nvim/filetype.lua
And add the following content:
vim.filetype.add({
extension = {
hx = 'haxe',
},
})