Commit graph

16 commits

Author SHA1 Message Date
Max Brunsfeld
d47713ee4a Integrate WASM compilation into the CLI's Loader 2022-11-15 17:14:33 -08:00
Michael Davis
47dc88b647
add tags config fixture test helper 2021-12-18 11:07:18 -06:00
Edgar
9feca80b08
Make HighlightConfiguration::configure use into iterator instead of a Vec<String> 2021-06-16 19:14:45 +02:00
Douglas Creager
e841fcfa1b cli: Extract CLI configuration into separate crate
This patch adds the `tree-sitter-config` crate, which manages
tree-sitter's configuration file.  This new setup allows different
components to define their own serializable configuration types, instead
of having to create a single monolithic configuration type.  But the
configuration itself is still stored in a single JSON file.

Before, the default location for the configuration file was
`~/.tree-sitter/config.json`.  This patch updates the default location
to follow the XDG Base Directory spec (or other relevant platform-
specific spec).  So on Linux, for instance, the new default location is
`~/.config/tree-sitter/config.json`.  We will look in the new location
_first_, and fall back on reading from the legacy location if we can't
find anything.
2021-06-10 10:21:22 -04:00
Douglas Creager
66c30648c2 rust: Extract runtime language detection into separate crate
This patch adds a new `tree-sitter-loader` crate, which holds the CLI's
logic for finding and building local grammar definitions at runtime.
This allows other command-line tools to use this logic too!
2021-06-09 17:42:30 -04:00
Max Brunsfeld
a40045a419 When editing, properly invalidate trees that depend on get_column 2021-03-11 14:46:13 -08:00
Max Brunsfeld
3f109a3cb5 highlight: Fix logic for handling empty injections with no highlights 2020-01-27 12:32:37 -08:00
Max Brunsfeld
6dbfbaed07 Start work on a system for testing syntax highlighting 2019-12-05 09:45:54 -08:00
Max Brunsfeld
b3809274f0 Load highlight queries correctly in highlight unit tests 2019-10-14 17:24:16 -07:00
Max Brunsfeld
f4903578f8 Start reimplementing highlight crate with tree queries 2019-10-14 12:30:22 -07:00
Max Brunsfeld
98e4fd22ef Start work on a C API for syntax highlighting 2019-03-08 13:13:02 -08:00
Max Brunsfeld
e89b6b2402 Add a highlight subcommand 2019-02-19 12:32:03 -08:00
Max Brunsfeld
57c528b6c5 CLI: Determine language symbol from grammar, not package.json
Fixes #272
Fixes #277
2019-02-13 19:31:26 -08:00
Max Brunsfeld
4a98f0b87e Port unit test for missing tokens and included ranges 2019-02-04 14:44:06 -08:00
Max Brunsfeld
4cac85fec4 Add benchmark script
* Structure `cli` crate as both a library and an executable, so that
benchmarks can import code from the crate.
* Import macros in the Rust 2018 style.
2019-02-01 15:17:35 -08:00
Max Brunsfeld
af83e8034e Move test helpers into their own folder 2019-01-25 16:40:26 -08:00
Renamed from cli/src/tests/fixtures.rs (Browse further)