community/tree-sitter: don't modify grammar name in abuild-tree-sitter
The `-` character is not allowed in tree-sitter grammar names as defined by the tree-sitter JSON Schema file [1]. Some software using tree-sitter also builds upon this assumption. Most prominently, neovim rejects tree-sitter grammars containing a `-` character [2]. Therefore, for my point of view, no replacement shall be performed on the grammar name specified in grammar.json. It is not entirely clear to me why this string replacement was added in the first place. It is part of the initial commit adding abuild-tree-sitter, i.e. b12a2a43. Without this patch, several tree-sitter grammars that we package presently (e.g. tree-sitter-markdown or tree-sitter-c-sharp) do not work with neovim. See also !80246 [1]: https://github.com/tree-sitter/tree-sitter/blob/v0.25.2/docs/src/assets/schemas/grammar.schema.json#L15-L19 [2]: https://github.com/neovim/neovim/commit/8b11cf5092e0dfe45ee0f9cf0b72ce4ddeb8740c
parent
ac60d9a4
No related branches found
No related tags found
Please register or sign in to comment