On my Linux machine, I got the rescript parser running through the CLI by:
- putting the json file below (with my actual username in the paths) at
~/.config/tree-sitter/config.json
- cloning the
tree-sitter-rescript
repo so that the project root was at ~/tree-sitter/tree-sitter-rescript
- running
tree-sitter
build at the root of said repo
{
"parser-directories": [
"/home/<user>/github",
"/home/<user>/src",
"/home/<user>/source",
"/home/<user>/projects",
"/home/<user>/dev",
"/home/<user>/git",
"/home/<user>/tree-sitter"
],
"theme": {
"module": 136,
"string.special": 30,
"embedded": null,
"variable": 252,
"variable.builtin": {
"color": 252,
"bold": true
},
"variable.parameter": {
"color": 252,
"underline": true
},
"property": 124,
"constant": 94,
"number": {
"bold": true,
"color": 94
},
"constant.builtin": {
"color": 94,
"bold": true
},
"function.builtin": {
"color": 26,
"bold": true
},
"property.builtin": {
"bold": true,
"color": 124
},
"type.builtin": {
"bold": true,
"color": 23
},
"punctuation": 239,
"string": 28,
"constructor": 136,
"type": 23,
"punctuation.delimiter": 239,
"tag": 18,
"attribute": {
"color": 124,
"italic": true
},
"comment": {
"color": 245,
"italic": true
},
"operator": {
"bold": true,
"color": 239
},
"punctuation.bracket": 239,
"keyword": 56,
"punctuation.special": 239,
"function": 26
}
}
(The other directories were in the default config; they might work out of the box.)