refactor(ts): rewrite around Repo/Parser types

This commit is contained in:
2026-04-21 23:56:41 +02:00
parent bb06f1818d
commit 4b278ef672
2 changed files with 151 additions and 184 deletions
+46 -79
View File
@@ -44,85 +44,52 @@ require("pack").setup({
})
require("ts").setup({
parsers = {
"https://github.com/tree-sitter/tree-sitter-bash",
-- required by cpp
"https://github.com/tree-sitter/tree-sitter-c",
"https://github.com/uyha/tree-sitter-cmake",
"https://github.com/stsewd/tree-sitter-comment",
"https://github.com/tree-sitter/tree-sitter-cpp",
-- required by scss
"https://github.com/tree-sitter/tree-sitter-css",
"https://github.com/gbprod/tree-sitter-gitcommit",
"https://github.com/tree-sitter/tree-sitter-go",
{
"https://github.com/ngalaiko/tree-sitter-go-template",
lang = "gotmpl",
},
"https://github.com/tree-sitter/tree-sitter-html",
"https://github.com/tree-sitter/tree-sitter-json",
"https://github.com/tree-sitter-grammars/tree-sitter-luadoc",
{
"https://github.com/tree-sitter/tree-sitter-php",
specs = {
{ lang = "php", location = "php" },
{ lang = "php_only", location = "php_only" },
},
},
"https://github.com/tree-sitter/tree-sitter-python",
"https://github.com/tree-sitter/tree-sitter-rust",
"https://github.com/serenadeai/tree-sitter-scss",
{
"https://github.com/derekstride/tree-sitter-sql",
version = "gh-pages",
},
"https://github.com/tree-sitter-grammars/tree-sitter-svelte",
{
"https://github.com/tree-sitter/tree-sitter-typescript",
specs = {
{ lang = "typescript", location = "typescript" },
{ lang = "tsx", location = "tsx" },
},
},
{
"https://github.com/tree-sitter-grammars/tree-sitter-xml",
specs = {
{ lang = "xml", location = "xml" },
{ lang = "dtd", location = "dtd" },
},
},
"https://github.com/tree-sitter-grammars/tree-sitter-yaml",
"https://github.com/georgeharker/tree-sitter-zsh",
"https://github.com/tree-sitter/tree-sitter-bash",
-- required by cpp
"https://github.com/tree-sitter/tree-sitter-c",
"https://github.com/uyha/tree-sitter-cmake",
"https://github.com/stsewd/tree-sitter-comment",
"https://github.com/tree-sitter/tree-sitter-cpp",
-- required by scss
"https://github.com/tree-sitter/tree-sitter-css",
"https://github.com/gbprod/tree-sitter-gitcommit",
"https://github.com/tree-sitter/tree-sitter-go",
{
"https://github.com/ngalaiko/tree-sitter-go-template",
lang = "gotmpl",
},
languages = {
"bash",
"c", -- builtin
"cmake",
"comment",
"cpp",
"css",
"gitcommit",
"go",
"gotmpl",
"html",
"json",
"lua", -- builtin
"luadoc",
"markdown", -- builtin
"markdown_inline", -- builtin
"php",
"python",
"query", -- builtin
"rust",
"scss",
"sql",
"svelte",
"tsx",
"typescript",
"vim", -- builtin
"vimdoc", -- builtin
"xml",
"yaml",
"zsh",
"https://github.com/tree-sitter/tree-sitter-html",
"https://github.com/tree-sitter/tree-sitter-json",
"https://github.com/tree-sitter-grammars/tree-sitter-luadoc",
{
"https://github.com/tree-sitter/tree-sitter-php",
parsers = {
{ lang = "php", location = "php" },
{ lang = "php_only", location = "php_only" },
},
},
"https://github.com/tree-sitter/tree-sitter-python",
"https://github.com/tree-sitter/tree-sitter-rust",
"https://github.com/serenadeai/tree-sitter-scss",
{
"https://github.com/derekstride/tree-sitter-sql",
version = "gh-pages",
},
"https://github.com/tree-sitter-grammars/tree-sitter-svelte",
{
"https://github.com/tree-sitter/tree-sitter-typescript",
parsers = {
{ lang = "typescript", location = "typescript" },
{ lang = "tsx", location = "tsx" },
},
},
{
"https://github.com/tree-sitter-grammars/tree-sitter-xml",
parsers = {
{ lang = "xml", location = "xml" },
{ lang = "dtd", location = "dtd" },
},
},
"https://github.com/tree-sitter-grammars/tree-sitter-yaml",
"https://github.com/georgeharker/tree-sitter-zsh",
})