docs(highlight): update README with the new way to load languages

This commit is contained in:
Antonin Delpeuch 2025-06-05 08:41:00 +02:00 committed by GitHub
parent ad133ecb38
commit 88ac3abaa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,8 +12,8 @@ to parse, to your `Cargo.toml`:
```toml
[dependencies]
tree-sitter-highlight = "0.22.0"
tree-sitter-javascript = "0.21.3"
tree-sitter-highlight = "0.25.4"
tree-sitter-javascript = "0.23.1"
```
Define the list of highlight names that you will recognize:
@ -63,7 +63,7 @@ Load some highlighting queries from the `queries` directory of the language repo
```rust
use tree_sitter_highlight::HighlightConfiguration;
let javascript_language = tree_sitter_javascript::language();
let javascript_language = tree_sitter_javascript::LANGUAGE.into();
let mut javascript_config = HighlightConfiguration::new(
javascript_language,