docs(highlight): update README with the new way to load languages
This commit is contained in:
parent
ad133ecb38
commit
88ac3abaa1
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue