You can run syntax highlighting on an arbitrary file using tree-sitter highlight. This can either output colors directly
to your terminal using ANSI escape codes, or produce HTML (if the --html flag is passed). For more information, see
the syntax highlighting page.
tree-sitter highlight [OPTIONS] [PATHS]... # Aliases: hiOutput an HTML document with syntax highlighting.
Output HTML with CSS classes instead of inline styles.
Check that the highlighting captures conform strictly to the standards.
The path to a file with captures. These captures would be considered the "standard" captures to compare against.
The paths to query files to use for syntax highlighting. These should end in highlights.scm.
The language scope to use for syntax highlighting. This is useful when the language is ambiguous.
Print the time taken to highlight the file.
Suppress main output.
The path to a file that contains paths to source files to highlight
The path to the directory containing the grammar.
The path to an alternative configuration (config.json) file. See the init-config command for more information.
Highlight the contents of a specific test.