community/tree-sitter: don't modify grammar name in abuild-tree-sitter
AFAIK, 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 (closed)
Edited by Sören Tempel