Commit graph

29 commits

Author SHA1 Message Date
Yuri Astrakhan 48059b72a8 feat: remove lazy_static in favor of LazyLock
This switches to the built-in `std::sync::LazyLock`
2025-01-21 00:21:35 -05:00
WillLillis faf97b896a fix(cli): use xdg config directory on macOS
fix: address feedback
2024-12-23 02:09:06 -05:00
Amaan Qureshi 9e1a2a701b fix(cli): correct default query paths 2024-12-15 23:05:54 -05:00
ObserverOfTime 8515986b73 docs(rust): document optional features 2024-10-24 17:08:55 +00:00
Amaan Qureshi 72f114fa12 perf(loader): improve language lookup speed 2024-10-12 03:08:57 -04:00
Amaan Qureshi 9c08edb066 build: configure clippy lints at the workspace level 2024-10-08 21:07:41 -04:00
Amaan Qureshi ea3846a2c5
feat: move tree-sitter configuration to dedicated file (#3700) 2024-09-30 11:11:23 -04:00
Joel Spadin 755e49e212 fix(wasm): use / paths for workdir
Reimplemented the fix from #2183 to fix building WASM files with Docker
on Windows again. The --workdir argument gives a path inside the Docker
container, so it must use forward slashes regardless of the default path
separator on the host OS.
2024-09-22 00:50:33 -04:00
Guillaume Bertholon 1c7b518b9d
build(loader): make dependencies optional (#1638)
The `tree-sitter-loader` crate currently always pulls
`tree-sitter-highlight` and `tree-sitter-tags` as dependencies.
However, apart from the tree-sitter CLI, most clients will not need both
of these libraries.

This commit makes the dependencies optional, but still includes them by
default in order not to break the backward compatibility.
2024-07-28 10:59:21 +03:00
Amaan Qureshi abc7910381 refactor(rust): misc fixes & tidying 2024-04-11 22:35:43 -04:00
Max Brunsfeld 99a720c968 Remove dependency on which crate 2024-03-12 12:19:27 -07:00
Max Brunsfeld 29d3583bdf Use workspace dependencies for internal crates 2024-02-25 11:14:29 -08:00
Amaan Qureshi 068e29c265 build: unify crate versions via workspace 2024-02-24 18:30:04 -05:00
Amaan Qureshi 4408c1570e
fix: publish in the right order now 2024-02-21 15:24:47 -05:00
Amaan Qureshi a5b7c2a584
fix: publish 0.21.0 to registries 2024-02-21 15:11:37 -05:00
Amaan Qureshi d80d101e34 build: move common Cargo.toml keys into the workspace and inherit them 2024-02-14 14:56:23 -05:00
Amaan Qureshi 48deb309db chore(cli): warn users when a query path needed for a subcommand isn't specified in a grammar's package.json 2024-02-12 17:17:37 -05:00
Amaan Qureshi 7233c2f26f feat: use lockfiles to dedup recompilation 2024-02-12 06:30:36 -05:00
Amaan Qureshi a969fc428c chore: move dependencies into the workspace and inherit from there 2024-02-08 15:24:09 -05:00
Max Brunsfeld 091652721e Use upstream wasmtime 2023-10-27 12:43:16 +01:00
Max Brunsfeld f4e2f68f14 Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
Andrew Hlynskyi 59b8eaf911 rust: pin serde version on 1.0.171 due to serde-rs/serde#2538 2023-08-19 16:15:47 +03:00
Andrew Hlynskyi da894afef5 cargo: specify minimum supported Rust version 2023-04-04 03:42:55 +03:00
Max Brunsfeld d47713ee4a Integrate WASM compilation into the CLI's Loader 2022-11-15 17:14:33 -08:00
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
Max Brunsfeld e22b42c9e6 Bump lib tree-sitter dependency versions in loader crate 2021-09-03 13:29:03 -07: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