Add more Rust delimiter tokens

ida_star
Wilfred Hughes 2021-09-12 00:36:33 +07:00
parent 58deff7c46
commit 2da9747e26
2 changed files with 3 additions and 2 deletions

@ -12,7 +12,8 @@ Fixed an issue with parsing integer values in CSS with units,
e.g. `123px`.
Improved parsing of Rust punctuation like `&` and `::` inside macro
invocations.
invocations. Improved handling of `|closure_param|` and `[` `]`
delimiters in Rust.
The line-based parser for text files now uses word-level diffs.

@ -126,7 +126,7 @@ pub fn from_extension(extension: &OsStr) -> Option<TreeSitterConfig> {
atom_nodes: (vec!["char_literal", "string_literal"])
.into_iter()
.collect(),
open_delimiter_tokens: (vec!["{", "("]).into_iter().collect(),
open_delimiter_tokens: (vec!["{", "(", "[", "|"]).into_iter().collect(),
}),
"ts" => Some(TreeSitterConfig {
name: "TypeScript",