MCPcopy Create free account
hub / github.com/codeaashu/claude-code / scopeColor

Function scopeColor

src/native-ts/color-diff/index.ts:453–467  ·  view source on GitHub ↗
(
  scope: string | undefined,
  text: string,
  theme: Theme,
)

Source from the content-addressed store, hash-verified

451}
452
453function scopeColor(
454 scope: string | undefined,
455 text: string,
456 theme: Theme,
457): Color {
458 if (!scope) return theme.foreground
459 if (scope === 'keyword' && STORAGE_KEYWORDS.has(text.trim())) {
460 return theme.scopes['_storage'] ?? theme.foreground
461 }
462 return (
463 theme.scopes[scope] ??
464 theme.scopes[scope.split('.')[0]!] ??
465 theme.foreground
466 )
467}
468
469function flattenHljs(
470 node: HljsNode | string,

Callers 1

flattenHljsFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected