Commit graph

11 commits

Author SHA1 Message Date
Max Brunsfeld
cc66e07a6e loader: 0.20.0 2021-11-21 13:40:33 -08:00
Amin Yahyaabadi
8a5620ce15 Use serde's derive feature 2021-10-05 02:38:18 -05:00
Andrew Hlynskyi
62d79b80e1 feat(cli): add a flag to compile a parser in debug mode with -O0 C/C++ compiler flag 2021-09-13 13:48:02 +03:00
Max Brunsfeld
e22b42c9e6 Bump lib tree-sitter dependency versions in loader crate 2021-09-03 13:29:03 -07:00
Andrew Hlynskyi
52e6c900c3 fix(lib): fix segfault on ts_query_new with incompatible grammar version, close #1318 2021-09-03 14:24:18 +03:00
Andrew Hlynskyi
2921386444 feat(cli/loader): Add TREE_SITTER_INTERNAL_BUILD C/C++ compiler definition 2021-06-30 18:53:07 +03:00
toyboot4e
56b215e5be allow ~ or $HOME in parser-directories 2021-06-30 23:29:57 +09:00
Edgar
9feca80b08
Make HighlightConfiguration::configure use into iterator instead of a Vec<String> 2021-06-16 19:14:45 +02:00
Douglas Creager
b44270efab cli: Missing config file shouldn't be an error
Just fall back on the default values for each configuration option.
2021-06-10 10:22:20 -04: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