Commit graph

25 commits

Author SHA1 Message Date
Amaan Qureshi
5825e24d56 style: wrap comments 2024-04-11 22:35:43 -04:00
Amaan Qureshi
b35efa8f33 style: format imports 2024-04-11 22:35:43 -04:00
Amaan Qureshi
068e29c265 build: unify crate versions via workspace 2024-02-24 18:30:04 -05:00
Amaan Qureshi
f6b46440c2
fix: bump config 2024-02-21 15:26:25 -05:00
Will Lillis
f894a5350c
feat(cli): add optional config-path argument 2024-02-21 12:02:12 -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
a969fc428c chore: move dependencies into the workspace and inherit from there 2024-02-08 15:24:09 -05:00
Amaan Qureshi
1b44a6f912
chore(config): apply clippy fixes 2024-02-03 19:38:30 -05:00
Max Brunsfeld
091652721e Use upstream wasmtime 2023-10-27 12:43:16 +01:00
Andrew Hlynskyi
0862921537 doc: Include README as top-level module documentation for all crates 2023-08-28 23:09:37 +03: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
sogaiu
23ce370fa3 cli: Stop config.json search sooner if TREE_SITTER_DIR set 2023-01-16 15:30:40 +09:00
sogaiu
adeb8d0aa9 cli: Make init-config respect TREE_SITTER_DIR 2023-01-16 15:30:38 +09:00
Andrew Hlynskyi
f627a97d24 loader: use portable way of path joining 2023-01-11 04:12:13 +02:00
rhysd
21c6cd8c22 cli: fix warnings from cargo doc 2022-05-31 10:59:30 +09:00
James McCoy
8e698371a2
config: Bump minimum serde_json version to 1.0.45
This is the version which introduced Map's append function, used in
Config::add.
2022-01-01 23:27:42 -05:00
Max Brunsfeld
86b408412c Use serde's derive feature everywhere 2021-11-21 13:39:30 -08:00
Max Brunsfeld
64e6c11566
Merge pull request #1234 from ahlinc/fix/imrove-config-loading-err-msgs
fix(cli): Improve error messages on config.json loading, closes #1227
2021-07-15 20:37:40 -07:00
Andrew Hlynskyi
13108baef7 fix(cli): Improve error messages on config.json loading, closes #1227 2021-07-16 05:43:39 +03:00
Andrew Hlynskyi
bc94c0cc2f fix(cli): fix theme key loading from config.json, closes #1232 2021-07-03 03:38:24 +03:00
Vladimir Panteleev
09e2e9fe87
fix(cli): Avoid ENOENT if config.json is not in TREE_SITTER_DIR
Fixes #1222.
2021-07-01 20:58:23 +00:00
Andrew Hlynskyi
2e2b239c42 fix(cli): Don't silently overwrite existing config file 2021-06-27 03:15:35 +03: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