Skip to content

Commit

Permalink
fix(haxe): fix treesitter detection for haxe (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored Jul 13, 2023
1 parent febbbad commit 19218ff
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions lua/astrocommunity/pack/haxe/init.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
local utils = require "astronvim.utils"
return {
{
"vantreeseba/tree-sitter-haxe",
dependencies = "nvim-treesitter/nvim-treesitter",
lazy = false,
build = "cp -r queries ../nvim-treesitter/queries/haxe",
config = function()
vim.filetype.add { extension = { hx = "haxe" } }
require("nvim-treesitter.parsers").get_parser_configs().haxe =
{ install_info = { url = vim.fn.stdpath "data" .. "/lazy/tree-sitter-haxe", files = { "src/parser.c" } } }
vim.cmd.TSInstall "haxe"
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts)
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "haxe_language_server")
end,
"nvim-treesitter/nvim-treesitter",
optional = true,
dependencies = {
{
"vantreeseba/tree-sitter-haxe",
build = "cp -r queries ../nvim-treesitter/queries/haxe",
init = function() vim.filetype.add { extension = { hx = "haxe" } } end,
config = function()
require("nvim-treesitter.parsers").get_parser_configs().haxe = {
install_info = { url = vim.fn.stdpath "data" .. "/lazy/tree-sitter-haxe", files = { "src/parser.c" } },
filetype = "haxe",
}
end,
},
},
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "haxe") end,
}

0 comments on commit 19218ff

Please sign in to comment.