Tools and documentation for how Dart code is formatted
25
stars
91
commits
Dart
primary language
Sep 10, 2026
updated
The primary TextMate language grammar for Dart. This grammar is used by most editors and websites to provide syntax highlighting for Dart code.
It includes support for modern Dart features, including:
switch expressions, if-case), Records, Class Modifiers (sealed, base, interface, final), and Extension Types.macro, augment, and augmented.package:syntax_highlight - A Flutter package for syntax highlighting using this grammar.When updating the grammar, consider raising issues (or PRs) to update the following files which may not have automated updates from this repository:
These projects use different highlighting engines and maintain their own Dart grammars.
Tree-sitter is an incremental parsing system. There is no official tree-sitter grammar for Dart, but there are active community implementations:
highlight.js is a JavaScript-based syntax highlighter.
CodeMirror is a web-based code editor.
@codemirror/legacy-modes.Prism is a lightweight, extensible syntax highlighter.
Dart
100.0%
Tools and documentation for how Dart code is formatted
25
stars
91
commits
Dart
primary language
Sep 10, 2026
updated
The primary TextMate language grammar for Dart. This grammar is used by most editors and websites to provide syntax highlighting for Dart code.
It includes support for modern Dart features, including:
switch expressions, if-case), Records, Class Modifiers (sealed, base, interface, final), and Extension Types.macro, augment, and augmented.package:syntax_highlight - A Flutter package for syntax highlighting using this grammar.When updating the grammar, consider raising issues (or PRs) to update the following files which may not have automated updates from this repository:
These projects use different highlighting engines and maintain their own Dart grammars.
Tree-sitter is an incremental parsing system. There is no official tree-sitter grammar for Dart, but there are active community implementations:
highlight.js is a JavaScript-based syntax highlighter.
CodeMirror is a web-based code editor.
@codemirror/legacy-modes.Prism is a lightweight, extensible syntax highlighter.
Dart
100.0%