astronvim_config/lua/plugins/treesitter.lua

34 lines
719 B
Lua
Raw Normal View History

2025-06-30 13:45:29 +02:00
if true then return {} end
-- Customize Treesitter
---@type LazySpec
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"lua",
"vim",
"markdown",
-- add more arguments for adding more treesitter parsers
},
highlight = {
enable = true,
},
},
config = function()
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config["selinux"] = {
install_info = {
url = "~/code/tree-sitter-selinux/",
files = { "src/parser.c" },
branch = "main",
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = "te",
}
end,
}