on master help sign in
support Bazel languages (#2903)
commit64cf4c859b67c98042e2d66f26be0ce4a7afc6e0 authorMichael Davis <mcarsondavis@gmail.com> dateMon 27 Jun 2022, 22:18 (4 years ago) parent6f93237
5 files changed+16−1
book/src/generated/lang-support.md+1 languages.toml+11−1 runtime/queries/starlark/highlights.scm+1 runtime/queries/starlark/injections.scm+2 runtime/queries/starlark/textobjects.scm+1
book/src/generated/lang-support.md+1
@@ -85,6 +85,7 @@
8585| solidity | ✓ | | | `solc` |
8686| sql | ✓ | | | |
8787| sshclientconfig | ✓ | | | |
88+| starlark | ✓ | ✓ | | |
8889| svelte | ✓ | | ✓ | `svelteserver` |
8990| swift | ✓ | | | `sourcekit-lsp` |
9091| tablegen | ✓ | ✓ | ✓ | |
languages.toml+11−1
@@ -461,7 +461,7 @@ source = { git = "https://github.com/tree-sitter/tree-sitter-ruby", rev = "dfff6
461461name = "bash"
462462scope = "source.bash"
463463injection-regex = "bash"
464−file-types = ["sh", "bash", "zsh", ".bash_login", ".bash_logout", ".bash_profile", ".bashrc", ".profile", ".zshenv", ".zlogin", ".zlogout", ".zprofile", ".zshrc", "APKBUILD", "PKGBUILD", "eclass", "ebuild"]
464+file-types = ["sh", "bash", "zsh", ".bash_login", ".bash_logout", ".bash_profile", ".bashrc", ".profile", ".zshenv", ".zlogin", ".zlogout", ".zprofile", ".zshrc", "APKBUILD", "PKGBUILD", "eclass", "ebuild", "bazelrc"]
465465shebangs = ["sh", "bash", "dash"]
466466roots = []
467467comment-token = "#"
@@ -1478,3 +1478,13 @@ indent = { tab-width = 2, unit = " " }
14781478[[grammar]]
14791479name = "clojure"
14801480source = { git = "https://github.com/sogaiu/tree-sitter-clojure", rev = "e57c569ae332ca365da623712ae1f50f84daeae2" }
1481+
1482+[[language]]
1483+name = "starlark"
1484+scope = "source.starlark"
1485+injection-regex = "(starlark|bzl|bazel)"
1486+file-types = ["bzl", "bazel", "BUILD"]
1487+roots = []
1488+comment-token = "#"
1489+indent = { tab-width = 4, unit = " " }
1490+grammar = "python"
runtime/queries/starlark/highlights.scmnew file+1
@@ -0,0 +1 @@
1+; inherits: python
runtime/queries/starlark/injections.scmnew file+2
@@ -0,0 +1,2 @@
1+((comment) @injection.content
2+ (#set! injection.language "comment"))
runtime/queries/starlark/textobjects.scmnew file+1
@@ -0,0 +1 @@
1+; inherits: python