Commit graph

100 commits

Author SHA1 Message Date
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
f32fa784be
chore(highlight): apply clippy fixes 2024-02-04 04:19:09 -05:00
Max Brunsfeld
da16cb1459 Introduce language ref-count management C APIs, remove Copy impl for Language in Rust 2023-12-27 14:59:16 -08:00
Max Brunsfeld
473b3c8208 Add a CLI feature flag for wasm runtime support 2023-10-31 16:56:11 -07:00
Andrew Hlynskyi
52f7eaff31 chore(rust): make Query extra predicates state fully immutable 2023-09-02 23:12:28 +03:00
Andrew Hlynskyi
0862921537 doc: Include README as top-level module documentation for all crates 2023-08-28 23:09:37 +03:00
Amaan Qureshi
cd0bdf586f
fix(injections): only allow setting self/parent via #set! 2023-08-22 01:27:00 -04:00
Amaan Qureshi
e3a5863287
feat: add @injection.parent to inject an injection's node with the parent language 2023-08-21 01:08:17 -04:00
Amaan Qureshi
da6affaf94
feat: allow @injection.self to inject the node w/ itself 2023-08-21 00:53:04 -04:00
Amaan Qureshi
c332066666
fix(safety): improve docs for unsafe C functions 2023-08-19 19:49:29 -04:00
Andrew Hlynskyi
ffae7d6115 fix: mark helper Rust funcs that receive raw pointers as unsafe 2023-08-20 02:12:51 +03:00
Amaan Qureshi
ac579be788
fix(safety): mark functions that potentially deref a raw pointer as unsafe 2023-08-19 18:59:11 -04:00
Amaan Qureshi
45313e0dfb
feat: add injection.self to inject a node with itself 2023-08-18 18:37:57 -04:00
Amaan Qureshi
9971e5d5f5
feat: allow specifying an input captures-path argument 2023-08-17 22:20:57 -04:00
Amaan Qureshi
8eb92d1c64
feat: add an --apply-all-captures argument to highlight & test 2023-08-17 22:20:57 -04:00
Andrew Biehl
083b6949ed
docs: update tree-sitter-higlight README 2023-08-06 22:13:04 -04:00
Andrew Hlynskyi
7938db90fe TextProvider with generic return type 2023-07-30 21:56:58 +03:00
Amaan Qureshi
56cedba4bf
chore: bump dependencies 2023-07-19 03:18:17 -04:00
Patrick Thomson
a7481361cf
Treat leading _ character as private. 2023-07-15 19:43:41 -04:00
Patrick Thomson
01b47f1a15
Add more Helix captures, including the markup hierarchy. 2023-07-15 20:49:02 -04:00
Patrick Thomson
cb58bc593f
Add --check flag to tree-sitter highlight.
Recently I've been pulling a lot of grammars into GitHub's highlighting backend,
replacing legacy language support with tree-sitter highlighting queries.
Our backend systems have a standard set of highlight captures we expect, very
similar to the standard tagging captures we expect. Though end-user applications
are free to choose whatever tagging nomenclature they want, I think it's nice to
include a checking stage that will help us ensure that we know whether a capture
might be recognized or not. It will also help us figure out where we need to
expand our standard set of captures (see #1539).
2023-07-15 20:49:03 -04:00
Andrew Hlynskyi
613382c70a docs: update badges; fix markdown lint complains
Linter config `.vscode/settings.json`:
```json
{
    "[markdown]": {
        "files.trimTrailingWhitespace": false,
    },
    "markdownlint.config": {
        "default": true,
        // "ul-style": {
        //     "style": "asterisk"
        // },
        "MD001": false,
        "MD024": false,
        "MD025": false,
        "MD033": false,
        "MD041": false,
        "MD053": false,
    },
}
```
2023-04-16 23:39:08 +03:00
Andrew Hlynskyi
da894afef5 cargo: specify minimum supported Rust version 2023-04-04 03:42:55 +03:00
Andrew Hlynskyi
ec2af46f6f chore: remove all dead badges 2023-03-16 18:00:02 +02:00
Kian-Meng Ang
b8552ec6c4 Fix typos 2022-06-28 19:57:42 +08:00
Michael Davis
a3609aa07e
remove non-local query matches for locals 2022-01-18 17:04:00 -06:00
Michael Davis
51354ef776
use just an i32 to ignore match IDs 2022-01-17 22:20:05 -06:00
Michael Davis
83ef0aea12
prevent future matches for '#is-not? local' patterns 2022-01-17 22:03:09 -06:00
Max Brunsfeld
42360fc003 Bump library versions to 0.20.1 2021-11-21 12:33:12 -08:00
Max Brunsfeld
1eb4d8efe6 Bump tree-sitter dep version in tags and highlight crate 2021-09-03 13:31:26 -07:00
Paul Gey
a533e4d7bb Remove unnecessary borrows
This produces an `unused_must_use` warning on nightly:
https://github.com/rust-lang/rust/pull/86426
2021-08-14 15:44:24 +02:00
Max Brunsfeld
be69777350 libs: 0.20.0 2021-06-29 17:18:22 -07:00
Edgar Luque
cd9307b597
format 2021-06-17 09:17:13 +02:00
Edgar
652dec950c
use impl instead of intoiterator 2021-06-16 19:14:46 +02:00
Edgar
005eb12cfe
update readme accordingly 2021-06-16 19:14:45 +02:00
Edgar
9feca80b08
Make HighlightConfiguration::configure use into iterator instead of a Vec<String> 2021-06-16 19:14:45 +02:00
Douglas Creager
d2d01e77e3 cli: Use anyhow and thiserror for errors
This patch updates the CLI to use anyhow and thiserror for error
management.  The main feature that our custom `Error` type was providing
was a _list_ of messages, which would allow us to annotate "lower-level"
errors with more contextual information.  This is exactly what's
provided by anyhow's `Context` trait.

(This is setup work for a future PR that will pull the `config` and
`loader` modules out into separate crates; by using `anyhow` we wouldn't
have to deal with a circular dependency between with the new crates.)
2021-06-09 16:17:23 -04:00
Max Brunsfeld
8c3d1466ec Allow QueryCursor's text callback to return an iterator 2021-05-23 21:05:26 -07:00
Andrew Hlynskyi
de23c9219a binding_rust: Unbind nodes lifitime from a source for QueryCursor.captures 2021-04-22 21:00:58 +03:00
Douglas Creager
234bd79591 Update tree-sitter-{highlight,tags} READMEs
We now have an easier way to get at the language-specific configuration
in Rust, since we publish each language grammar as a crate with useful
accessor functions and globals.
2021-03-31 09:56:24 -04:00
Max Brunsfeld
841e160898 rust libs: 0.19.2 2021-03-08 10:03:45 -08:00
Max Brunsfeld
0818892a1a libs: 0.19.1 2021-03-05 15:31:48 -08:00
Max Brunsfeld
22fb88e89d Bump library versions to 0.19 2021-03-01 14:46:43 -08:00
Luis Hagenauer
11e7b108f2 highlight: Make README snippets compile 2020-11-24 12:35:38 +01:00
Max Brunsfeld
0a46033391 Remove duplication of LossyUtf8 helper 2020-10-14 11:35:50 -07:00
Max Brunsfeld
28557ea8b4 highlight: 0.3 2020-09-24 15:07:56 -07:00
Max Brunsfeld
f91b19c089 tags, highlight: Avoid completely deallocating buffers when shrinking 2020-08-05 09:57:45 -07:00
Max Brunsfeld
32f69dbe15 tags, highlight: Limit the size of buffers that are retained in memory 2020-08-05 09:06:00 -07:00
Max Brunsfeld
4d09c81577 highlight: Avoid accidentally treating locals patterns as highlight patterns 2020-07-10 13:33:04 -07:00