Skip to content

Commit be65dd1

Browse files
unhappychoiceclaude
andcommitted
fix(dart): use the highlight query bundled with tree-sitter-dart
The custom Dart query referenced node types that do not exist in the grammar (selector, class_definition, ...), so Query::new failed and Dart files were silently rendered without highlighting. tree-sitter-dart 0.3.0 also renamed several nodes. Use the grammar's own HIGHLIGHTS_QUERY, whose captures all map through capture_name_to_token. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent edf5913 commit be65dd1

2 files changed

Lines changed: 1 addition & 181 deletions

File tree

‎src/syntax/languages/dart.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pub fn language() -> tree_sitter::Language {
22
tree_sitter_dart::LANGUAGE.into()
33
}
44

5-
pub const HIGHLIGHT_QUERY: &str = include_str!("queries/dart_highlights.scm");
5+
pub const HIGHLIGHT_QUERY: &str = tree_sitter_dart::HIGHLIGHTS_QUERY;

‎src/syntax/languages/queries/dart_highlights.scm‎

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)