I’ve started working on a tree-sitter grammar for Atom. I’ve completed the tree-sitter grammar package, but am having trouble getting it working in atom. It’s not appearing in the list of grammars.
I followed the usual steps in the flight manual for creating tree-sitter grammars, and the start of the grammar looks like this:
name: 'Semmle QL' scopeName: 'source.ql' type: 'tree-sitter' parser: 'tree-sitter-ql' fileTypes: ['ql', 'qll'] firstLineRegex: [ # import '^import\s[a-z]+\\r?\\n' ] comments: start: '// ' scopes: //...
Here’s my atom version:
$ atom -v Atom : 1.38.2 Electron: 4.2.5 Chrome : 69.0.3497.128 Node : 10.11.0
I also had to deal with the module version mismatch for node, which I fixed by running
apm rebuild in the package directory. There are now no errors or anything appearing on startup.
When I try to add a classic textmate grammar in the same grammar directory, it seems to work fine and is picked up, it’s only the tree-sitter one that isn’t.
Any help would be greatly appreciated!