From 7d3c32125379c1dc02f47277bcd4eceaac299bdb Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Mon, 9 Feb 2026 12:03:09 -0800 Subject: [PATCH] feat: allow `-` in grammar names A number of grammars in the wild have this character in their name: - https://github.com/sogaiu/tree-sitter-janet-simple/pull/7 - https://github.com/tree-sitter/tree-sitter-c-sharp/pull/408 - https://github.com/tree-sitter/tree-sitter-embedded-template/pull/45 - https://github.com/tree-sitter/tree-sitter-ql-dbscheme/pull/7 I read through https://github.com/tree-sitter/tree-sitter/pull/3700 and https://github.com/tree-sitter/tree-sitter/issues/3637, and it doesn't look like there was much discussion about this name regex, so hopefully this is an acceptable change? --- docs/src/assets/schemas/config.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/assets/schemas/config.schema.json b/docs/src/assets/schemas/config.schema.json index 92453f37d..627f5ce4a 100644 --- a/docs/src/assets/schemas/config.schema.json +++ b/docs/src/assets/schemas/config.schema.json @@ -13,7 +13,7 @@ "name": { "type": "string", "description": "The name of the grammar.", - "pattern": "^[a-z0-9_]+$" + "pattern": "^[a-z0-9_-]+$" }, "camelcase": { "type": "string",