Skip to content

Commit

Permalink
chore: migrate to new tree-sitter.json (#152)
Browse files Browse the repository at this point in the history
tree-sitter greeted me with this message:
```
Warning: your package.json's `tree-sitter` field has been automatically migrated to the new `tree-sitter.json` config file
For more information, visit https://tree-sitter.github.io/tree-sitter/creating-parsers
```

In this PR, I want to migrate tree-sitter's config to the new format.
  • Loading branch information
mrdgo authored Nov 22, 2024
1 parent 54936b0 commit c926660
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
12 changes: 1 addition & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@
"tree-sitter-cli": "^0.22.5",
"prebuildify": "^6.0.0"
},
"tree-sitter": [
{
"scope": "source.nu",
"file-types": [
"nu"
],
"highlights": "queries/nu/highlights.scm",
"injections": "queries/nu/injections.scm"
}
],
"files": [
"grammar.js",
"binding.gyp",
Expand All @@ -47,4 +37,4 @@
"queries/*",
"src/**"
]
}
}
36 changes: 36 additions & 0 deletions tree-sitter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"grammars": [
{
"name": "nu",
"camelcase": "Nu",
"scope": "source.nu",
"path": ".",
"file-types": [
"nu"
],
"highlights": "queries/nu/highlights.scm",
"injections": "queries/nu/injections.scm"
}
],
"metadata": {
"version": "0.0.1",
"license": "MIT",
"description": "nu-lang",
"authors": [
{
"name": "The Nushell Contributors"
}
],
"links": {
"repository": "https://github.com/tree-sitter/tree-sitter-nu"
}
},
"bindings": {
"c": true,
"go": true,
"node": true,
"python": true,
"rust": true,
"swift": true
}
}

0 comments on commit c926660

Please sign in to comment.