MCPcopy Index your code
hub / github.com/anomalyco/opencode / getSyntaxRules

Function getSyntaxRules

packages/tui/src/theme/index.ts:586–1089  ·  view source on GitHub ↗
(theme: Theme)

Source from the content-addressed store, hash-verified

584}
585
586function getSyntaxRules(theme: Theme) {
587 return [
588 {
589 scope: ["default"],
590 style: {
591 foreground: theme.text,
592 },
593 },
594 {
595 scope: ["prompt"],
596 style: {
597 foreground: theme.accent,
598 },
599 },
600 {
601 scope: ["extmark.file"],
602 style: {
603 foreground: theme.warning,
604 bold: true,
605 },
606 },
607 {
608 scope: ["extmark.agent"],
609 style: {
610 foreground: theme.secondary,
611 bold: true,
612 },
613 },
614 {
615 scope: ["extmark.paste"],
616 style: {
617 foreground: selectedForeground(theme, theme.warning),
618 background: theme.warning,
619 bold: true,
620 },
621 },
622 {
623 scope: ["comment"],
624 style: {
625 foreground: theme.syntaxComment,
626 italic: true,
627 },
628 },
629 {
630 scope: ["comment.documentation"],
631 style: {
632 foreground: theme.syntaxComment,
633 italic: true,
634 },
635 },
636 {
637 scope: ["string", "symbol"],
638 style: {
639 foreground: theme.syntaxString,
640 },
641 },
642 {
643 scope: ["number", "boolean"],

Callers 2

generateSyntaxFunction · 0.85
generateSubtleSyntaxFunction · 0.85

Calls 1

selectedForegroundFunction · 0.85

Tested by

no test coverage detected