refactor(pack,ts): switch specs to src field and decentralize update hooks

This commit is contained in:
2026-05-06 20:52:49 +02:00
parent 3f3fdb2603
commit c7e0421e2a
4 changed files with 174 additions and 154 deletions
+10 -7
View File
@@ -37,13 +37,16 @@ require("pack").setup({
"https://github.com/hedyhli/outline.nvim",
"nvim.undotree",
{
"https://github.com/saghen/blink.cmp",
src = "https://github.com/saghen/blink.cmp",
version = vim.version.range("^1"),
},
})
require("ts").setup({
"https://github.com/tree-sitter/tree-sitter-bash",
{
src = "https://github.com/tree-sitter/tree-sitter-bash",
filetypes = { "sh" },
},
-- required by cpp
"https://github.com/tree-sitter/tree-sitter-c",
"https://github.com/uyha/tree-sitter-cmake",
@@ -54,14 +57,14 @@ require("ts").setup({
"https://github.com/gbprod/tree-sitter-gitcommit",
"https://github.com/tree-sitter/tree-sitter-go",
{
"https://github.com/ngalaiko/tree-sitter-go-template",
src = "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",
src = "https://github.com/tree-sitter/tree-sitter-php",
parsers = {
{ lang = "php", location = "php" },
{ lang = "php_only", location = "php_only" },
@@ -71,19 +74,19 @@ require("ts").setup({
"https://github.com/tree-sitter/tree-sitter-rust",
"https://github.com/serenadeai/tree-sitter-scss",
{
"https://github.com/derekstride/tree-sitter-sql",
src = "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",
src = "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",
src = "https://github.com/tree-sitter-grammars/tree-sitter-xml",
parsers = {
{ lang = "xml", location = "xml" },
{ lang = "dtd", location = "dtd" },