2024-05-24 16:07:28 +03:00
|
|
|
return {
|
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
build = ":TSUpdate",
|
2024-10-12 21:17:29 +03:00
|
|
|
init = function()
|
|
|
|
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
|
|
|
parser_config.c3 = {
|
|
|
|
install_info = {
|
|
|
|
url = "https://github.com/c3lang/tree-sitter-c3",
|
|
|
|
files = { "src/parser.c", "src/scanner.c" },
|
|
|
|
branch = "main",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
end,
|
2024-11-02 14:57:37 +02:00
|
|
|
dependencies = {
|
|
|
|
{ "nushell/tree-sitter-nu", build = ":TSUpdate nu" },
|
|
|
|
},
|
2024-05-24 16:07:28 +03:00
|
|
|
config = function()
|
|
|
|
local configs = require("nvim-treesitter.configs")
|
|
|
|
|
2024-10-05 10:18:03 +03:00
|
|
|
vim.filetype.add({
|
|
|
|
extension = {
|
|
|
|
fsh = "glsl",
|
|
|
|
vsh = "glsl",
|
|
|
|
|
|
|
|
hbs = "html",
|
2024-10-12 21:17:29 +03:00
|
|
|
|
|
|
|
c3 = "c3",
|
|
|
|
c3i = "c3",
|
|
|
|
c3t = "c3",
|
2024-10-05 10:18:03 +03:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2024-07-09 13:37:12 +03:00
|
|
|
vim.treesitter.language.register("html", "handlebars")
|
2024-10-05 10:18:03 +03:00
|
|
|
vim.treesitter.language.register("glsl", { "vsh", "fsh" })
|
2024-07-09 13:37:12 +03:00
|
|
|
|
2024-05-24 16:07:28 +03:00
|
|
|
configs.setup({
|
|
|
|
ensure_installed = {
|
|
|
|
-- web dev
|
|
|
|
"html",
|
|
|
|
"css",
|
|
|
|
"scss",
|
|
|
|
"javascript",
|
|
|
|
"typescript",
|
|
|
|
|
|
|
|
-- config
|
|
|
|
"toml",
|
|
|
|
"yaml",
|
|
|
|
"markdown",
|
|
|
|
"dockerfile",
|
2024-12-13 11:23:48 +02:00
|
|
|
"nu",
|
2024-05-24 16:07:28 +03:00
|
|
|
|
|
|
|
-- vim
|
|
|
|
"vim",
|
|
|
|
"vimdoc",
|
|
|
|
"lua",
|
|
|
|
"query",
|
|
|
|
|
|
|
|
-- the cool stuff
|
|
|
|
"elixir",
|
|
|
|
"heex",
|
|
|
|
"rust",
|
|
|
|
"python",
|
|
|
|
"zig",
|
2024-09-01 00:44:34 +03:00
|
|
|
"nim",
|
2024-05-24 16:07:28 +03:00
|
|
|
"bash",
|
2024-12-13 11:23:48 +02:00
|
|
|
"hurl",
|
2024-05-24 16:07:28 +03:00
|
|
|
|
|
|
|
-- the not so cool stuff
|
|
|
|
"c",
|
|
|
|
"java",
|
|
|
|
"groovy",
|
2024-10-05 10:18:03 +03:00
|
|
|
"glsl",
|
2024-11-09 10:39:23 +02:00
|
|
|
"wgsl",
|
2024-05-24 16:07:28 +03:00
|
|
|
},
|
|
|
|
sync_install = false,
|
|
|
|
highlight = { enable = true },
|
|
|
|
indent = { enable = true },
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
}
|