Skip to content

Commit

Permalink
feat(pack): add haxe language pack
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Mar 23, 2023
1 parent a599091 commit 6ff9989
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/astrocommunity/pack/haxe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Haxe Language Pack

This plugin pack does the following:

- Adds `haxe` Treesitter parser: https://github.com/vantreeseba/tree-sitter-haxe
- Adds `haxe` language server
22 changes: 22 additions & 0 deletions lua/astrocommunity/pack/haxe/haxe.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local utils = require "astrocommunity.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" } } }
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table
if not opts.ensure_installed then opts.ensure_installed = {} end
utils.list_insert_unique(opts.ensure_installed, "haxe_language_server")
end,
},
}

0 comments on commit 6ff9989

Please sign in to comment.