|
|
il y a 3 semaines | |
|---|---|---|
| .. | ||
| queries | e257051612 No predeclared identifiers, `Core` is a keyword (#4864) | il y a 1 an |
| src | 6f6e46ef57 Migrate tree-sitter support to MODULE.bazel (#4783) | il y a 1 an |
| testdata | 8fd4156616 Update tree_sitter for the new `self` syntax and `static var` (#7025) | il y a 3 semaines |
| .gitignore | 6f6e46ef57 Migrate tree-sitter support to MODULE.bazel (#4783) | il y a 1 an |
| BUILD | 8c3fa80691 Add cc rule wrappers for cc_env (#5277) | il y a 1 an |
| README.md | 8fd4156616 Update tree_sitter for the new `self` syntax and `static var` (#7025) | il y a 3 semaines |
| grammar.js | 8fd4156616 Update tree_sitter for the new `self` syntax and `static var` (#7025) | il y a 3 semaines |
| helix.sh | 6f6e46ef57 Migrate tree-sitter support to MODULE.bazel (#4783) | il y a 1 an |
| test_runner.cpp | 38d25cf622 Share ReadFile in tests (#4967) | il y a 1 an |
Tree-sitter is currently used for syntax highlighting in supported editors.
We use a non-hermetic tree-sitter invocation, so it must be installed locally. To install tree-sitter, run:
npm install -g tree-sitter-cli
To build and test changes to the grammar using Bazel, provide specific flags to
allow the build to access the system tree-sitter binary and environment.
bazel test //utils/tree_sitter:string_tests \
--strategy=Genrule=local \
--action_env=PATH \
--action_env=HOME
--strategy=Genrule=local: Disables sandboxing for the genrule that runs
tree-sitter generate, allowing it to find the system-installed binary.--action_env=PATH: Passes your current PATH to the build actions,
ensuring tree-sitter can be found. If tree-sitter is not in your default
PATH, you can specify it explicitly, for example:
--action_env=PATH=/path/to/tree-sitter/bin:$PATH.--action_env=HOME: Passes your HOME environment variable, which
tree-sitter may need to locate its configuration or cache../helix.shTODO