registerBuiltinEditorLanguages function
Registers the builtin profiles on registry (defaults to the shared
registry). Safe to call multiple times.
Implementation
void registerBuiltinEditorLanguages([EditorLanguageRegistry? registry]) {
final target = registry ?? EditorLanguageRegistry.shared;
for (final profile in builtinCodeLanguageProfiles()) {
target.register(profile);
}
target.fallback ??= const CodeLanguageProfile(
languageId: 'default',
lineCommentPrefix: '//',
blockCommentDelimiters: CodeBlockCommentDelimiters(start: '/*', end: '*/'),
);
}