Commit graph

116 commits

Author SHA1 Message Date
Ramkumar Ramachandra
07aaf2322e
fix: keep highlight names list consistent in the docs and cli
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-15 23:29:43 -05:00
Jonathan Raphaelson
8368f9994d
feat: add flag to output css classes instead of inline styles in HTML highlighter output
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-15 01:43:22 -05:00
Patrick Thomson
530e0571c9
feat(highlight): mark TSHighlighter fields as pub 2024-12-10 19:37:15 -05:00
Amaan Qureshi
e27160b118 feat(rust): remove usage of deprecated functions 2024-10-31 21:58:35 -04:00
Amaan Qureshi
9c08edb066 build: configure clippy lints at the workspace level 2024-10-08 21:07:41 -04:00
Lukas Seidel
6b1ebd3d29
feat!: implement StreamingIterator instead of Iterator for QueryMatches and QueryCaptures
This fixes UB when either `QueryMatches` or `QueryCaptures` had collect called on it.

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-09-29 17:34:48 -04:00
PanGan21
1a6af3fafe fix(docs): fix highlight readme example using compatible versions 2024-09-17 04:34:19 +02:00
Amaan Qureshi
e553578696 feat: add fuzz subcommand 2024-05-30 23:00:45 -04:00
Amaan Qureshi
90ba5256d1
fix(highlight): correct signature of ts_highlighter_add_language 2024-05-04 20:35:05 -04:00
Enno T. Boland
3ab3b055ed
docs(highlight): typo 2024-04-14 17:15:43 -04:00
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
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
a5b7c2a584
fix: publish 0.21.0 to registries 2024-02-21 15:11:37 -05:00
Amaan Qureshi
e996c32108 refactor!: remove the apply-all-captures flag, make last-wins precedence the default 2024-02-16 12:34: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
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