Skip to main content

Module registry

Module registry 

Source
Expand description

Language registry: maps a file path to its tree-sitter grammar, a configured highlight configuration, and (where the grammar ships one) a tags query used for scope/definition lookup. Built once and reused.

Structs§

LangEntry
LanguageRegistry

Constants§

HIGHLIGHT_NAMES
Capture names recognized during highlighting. A grammar capture like function.method resolves to the longest matching prefix here (function), so listing the general categories is enough to color every grammar.

Statics§

REGISTRY
The grammars, built once for the process. Registration only records the grammar and its query text, so this costs microseconds; a theme switch rebuilds the palette and reuses these.