@@ -36,12 +36,13 @@ var catppuccinDark = ansi.StyleConfig{
36 Italic: boolPtr(true),
36 Italic: boolPtr(true),
37 Prefix: "┃ ",
37 Prefix: "┃ ",
39− Indent: uintPtr(1),
39+ Indent: uintPtr(1),
40− Margin: uintPtr(defaultMargin),
40+ IndentToken: stringPtr(BaseStyle.Render(" ")),
42 List: ansi.StyleList{
42 List: ansi.StyleList{
43 LevelIndent: defaultMargin,
43 LevelIndent: defaultMargin,
44 StyleBlock: ansi.StyleBlock{
44 StyleBlock: ansi.StyleBlock{
45+ IndentToken: stringPtr(BaseStyle.Render(" ")),
45 StylePrimitive: ansi.StylePrimitive{
46 StylePrimitive: ansi.StylePrimitive{
46 Color: stringPtr(dark.Text().Hex),
47 Color: stringPtr(dark.Text().Hex),
@@ -496,3 +497,444 @@ var catppuccinLight = ansi.StyleConfig{
496 Color: stringPtr(light.Sapphire().Hex),
497 Color: stringPtr(light.Sapphire().Hex),
501+func MarkdownTheme(focused bool) ansi.StyleConfig {
503+ return ASCIIStyleConfig
505+ return DraculaStyleConfig
510+ defaultListIndent = 2
511+ defaultListLevelIndent = 4
514+var ASCIIStyleConfig = ansi.StyleConfig{
515+ Document: ansi.StyleBlock{
516+ StylePrimitive: ansi.StylePrimitive{
517+ BackgroundColor: stringPtr(Background.Dark),
520+ IndentToken: stringPtr(BaseStyle.Render(" ")),
522+ BlockQuote: ansi.StyleBlock{
523+ StylePrimitive: ansi.StylePrimitive{
524+ BackgroundColor: stringPtr(Background.Dark),
527+ IndentToken: stringPtr("| "),
529+ Paragraph: ansi.StyleBlock{
530+ StylePrimitive: ansi.StylePrimitive{
531+ BackgroundColor: stringPtr(Background.Dark),
534+ List: ansi.StyleList{
535+ StyleBlock: ansi.StyleBlock{
536+ IndentToken: stringPtr(BaseStyle.Render(" ")),
537+ StylePrimitive: ansi.StylePrimitive{
538+ BackgroundColor: stringPtr(Background.Dark),
541+ LevelIndent: defaultListLevelIndent,
543+ Heading: ansi.StyleBlock{
544+ StylePrimitive: ansi.StylePrimitive{
545+ BackgroundColor: stringPtr(Background.Dark),
549+ H1: ansi.StyleBlock{
550+ StylePrimitive: ansi.StylePrimitive{
551+ BackgroundColor: stringPtr(Background.Dark),
555+ H2: ansi.StyleBlock{
556+ StylePrimitive: ansi.StylePrimitive{
557+ BackgroundColor: stringPtr(Background.Dark),
561+ H3: ansi.StyleBlock{
562+ StylePrimitive: ansi.StylePrimitive{
563+ BackgroundColor: stringPtr(Background.Dark),
567+ H4: ansi.StyleBlock{
568+ StylePrimitive: ansi.StylePrimitive{
569+ BackgroundColor: stringPtr(Background.Dark),
573+ H5: ansi.StyleBlock{
574+ StylePrimitive: ansi.StylePrimitive{
575+ BackgroundColor: stringPtr(Background.Dark),
579+ H6: ansi.StyleBlock{
580+ StylePrimitive: ansi.StylePrimitive{
581+ BackgroundColor: stringPtr(Background.Dark),
585+ Strikethrough: ansi.StylePrimitive{
586+ BackgroundColor: stringPtr(Background.Dark),
590+ Emph: ansi.StylePrimitive{
591+ BackgroundColor: stringPtr(Background.Dark),
595+ Strong: ansi.StylePrimitive{
596+ BackgroundColor: stringPtr(Background.Dark),
600+ HorizontalRule: ansi.StylePrimitive{
601+ BackgroundColor: stringPtr(Background.Dark),
602+ Format: "\n--------\n",
604+ Item: ansi.StylePrimitive{
606+ BackgroundColor: stringPtr(Background.Dark),
608+ Enumeration: ansi.StylePrimitive{
610+ BackgroundColor: stringPtr(Background.Dark),
612+ Task: ansi.StyleTask{
615+ StylePrimitive: ansi.StylePrimitive{
616+ BackgroundColor: stringPtr(Background.Dark),
619+ ImageText: ansi.StylePrimitive{
620+ BackgroundColor: stringPtr(Background.Dark),
621+ Format: "Image: {{.text}} →",
623+ Code: ansi.StyleBlock{
624+ StylePrimitive: ansi.StylePrimitive{
627+ BackgroundColor: stringPtr(Background.Dark),
630+ CodeBlock: ansi.StyleCodeBlock{
631+ StyleBlock: ansi.StyleBlock{
632+ StylePrimitive: ansi.StylePrimitive{
633+ BackgroundColor: stringPtr(Background.Dark),
635+ Margin: uintPtr(defaultMargin),
638+ Table: ansi.StyleTable{
639+ StyleBlock: ansi.StyleBlock{
640+ StylePrimitive: ansi.StylePrimitive{
641+ BackgroundColor: stringPtr(Background.Dark),
643+ IndentToken: stringPtr(BaseStyle.Render(" ")),
645+ CenterSeparator: stringPtr("|"),
646+ ColumnSeparator: stringPtr("|"),
647+ RowSeparator: stringPtr("-"),
649+ DefinitionDescription: ansi.StylePrimitive{
650+ BackgroundColor: stringPtr(Background.Dark),
651+ BlockPrefix: "\n* ",
655+var DraculaStyleConfig = ansi.StyleConfig{
656+ Document: ansi.StyleBlock{
657+ StylePrimitive: ansi.StylePrimitive{
658+ Color: stringPtr(Forground.Dark),
659+ BackgroundColor: stringPtr(Background.Dark),
661+ Indent: uintPtr(defaultMargin),
662+ IndentToken: stringPtr(BaseStyle.Render(" ")),
664+ BlockQuote: ansi.StyleBlock{
665+ StylePrimitive: ansi.StylePrimitive{
666+ Color: stringPtr("#f1fa8c"),
667+ Italic: boolPtr(true),
668+ BackgroundColor: stringPtr(Background.Dark),
670+ Indent: uintPtr(defaultMargin),
671+ IndentToken: stringPtr(BaseStyle.Render(" ")),
673+ Paragraph: ansi.StyleBlock{
674+ StylePrimitive: ansi.StylePrimitive{
675+ BackgroundColor: stringPtr(Background.Dark),
678+ List: ansi.StyleList{
679+ LevelIndent: defaultMargin,
680+ StyleBlock: ansi.StyleBlock{
681+ IndentToken: stringPtr(BaseStyle.Render(" ")),
682+ StylePrimitive: ansi.StylePrimitive{
683+ Color: stringPtr(Forground.Dark),
684+ BackgroundColor: stringPtr(Background.Dark),
688+ Heading: ansi.StyleBlock{
689+ StylePrimitive: ansi.StylePrimitive{
691+ Color: stringPtr("#bd93f9"),
692+ Bold: boolPtr(true),
693+ BackgroundColor: stringPtr(Background.Dark),
696+ H1: ansi.StyleBlock{
697+ StylePrimitive: ansi.StylePrimitive{
699+ BackgroundColor: stringPtr(Background.Dark),
702+ H2: ansi.StyleBlock{
703+ StylePrimitive: ansi.StylePrimitive{
705+ BackgroundColor: stringPtr(Background.Dark),
708+ H3: ansi.StyleBlock{
709+ StylePrimitive: ansi.StylePrimitive{
711+ BackgroundColor: stringPtr(Background.Dark),
714+ H4: ansi.StyleBlock{
715+ StylePrimitive: ansi.StylePrimitive{
717+ BackgroundColor: stringPtr(Background.Dark),
720+ H5: ansi.StyleBlock{
721+ StylePrimitive: ansi.StylePrimitive{
723+ BackgroundColor: stringPtr(Background.Dark),
726+ H6: ansi.StyleBlock{
727+ StylePrimitive: ansi.StylePrimitive{
729+ BackgroundColor: stringPtr(Background.Dark),
732+ Strikethrough: ansi.StylePrimitive{
733+ CrossedOut: boolPtr(true),
734+ BackgroundColor: stringPtr(Background.Dark),
736+ Emph: ansi.StylePrimitive{
737+ Color: stringPtr("#f1fa8c"),
738+ Italic: boolPtr(true),
739+ BackgroundColor: stringPtr(Background.Dark),
741+ Strong: ansi.StylePrimitive{
742+ Bold: boolPtr(true),
743+ Color: stringPtr("#ffb86c"),
744+ BackgroundColor: stringPtr(Background.Dark),
746+ HorizontalRule: ansi.StylePrimitive{
747+ Color: stringPtr("#6272A4"),
748+ Format: "\n--------\n",
749+ BackgroundColor: stringPtr(Background.Dark),
751+ Item: ansi.StylePrimitive{
753+ BackgroundColor: stringPtr(Background.Dark),
755+ Enumeration: ansi.StylePrimitive{
757+ Color: stringPtr("#8be9fd"),
758+ BackgroundColor: stringPtr(Background.Dark),
760+ Task: ansi.StyleTask{
761+ StylePrimitive: ansi.StylePrimitive{
762+ BackgroundColor: stringPtr(Background.Dark),
767+ Link: ansi.StylePrimitive{
768+ Color: stringPtr("#8be9fd"),
769+ Underline: boolPtr(true),
770+ BackgroundColor: stringPtr(Background.Dark),
772+ LinkText: ansi.StylePrimitive{
773+ Color: stringPtr("#ff79c6"),
774+ BackgroundColor: stringPtr(Background.Dark),
776+ Image: ansi.StylePrimitive{
777+ Color: stringPtr("#8be9fd"),
778+ Underline: boolPtr(true),
779+ BackgroundColor: stringPtr(Background.Dark),
781+ ImageText: ansi.StylePrimitive{
782+ Color: stringPtr("#ff79c6"),
783+ Format: "Image: {{.text}} →",
784+ BackgroundColor: stringPtr(Background.Dark),
786+ Code: ansi.StyleBlock{
787+ StylePrimitive: ansi.StylePrimitive{
788+ Color: stringPtr("#50fa7b"),
789+ BackgroundColor: stringPtr(Background.Dark),
792+ Text: ansi.StylePrimitive{
793+ BackgroundColor: stringPtr(Background.Dark),
795+ DefinitionList: ansi.StyleBlock{},
796+ CodeBlock: ansi.StyleCodeBlock{
797+ StyleBlock: ansi.StyleBlock{
798+ StylePrimitive: ansi.StylePrimitive{
799+ Color: stringPtr("#ffb86c"),
800+ BackgroundColor: stringPtr(Background.Dark),
802+ Margin: uintPtr(defaultMargin),
804+ Chroma: &ansi.Chroma{
805+ NameOther: ansi.StylePrimitive{
806+ BackgroundColor: stringPtr(Background.Dark),
808+ Literal: ansi.StylePrimitive{
809+ BackgroundColor: stringPtr(Background.Dark),
811+ NameException: ansi.StylePrimitive{
812+ BackgroundColor: stringPtr(Background.Dark),
814+ LiteralDate: ansi.StylePrimitive{
815+ BackgroundColor: stringPtr(Background.Dark),
817+ Text: ansi.StylePrimitive{
818+ Color: stringPtr(Forground.Dark),
819+ BackgroundColor: stringPtr(Background.Dark),
821+ Error: ansi.StylePrimitive{
822+ Color: stringPtr("#f8f8f2"),
823+ BackgroundColor: stringPtr("#ff5555"),
825+ Comment: ansi.StylePrimitive{
826+ Color: stringPtr("#6272A4"),
827+ BackgroundColor: stringPtr(Background.Dark),
829+ CommentPreproc: ansi.StylePrimitive{
830+ Color: stringPtr("#ff79c6"),
831+ BackgroundColor: stringPtr(Background.Dark),
833+ Keyword: ansi.StylePrimitive{
834+ Color: stringPtr("#ff79c6"),
835+ BackgroundColor: stringPtr(Background.Dark),
837+ KeywordReserved: ansi.StylePrimitive{
838+ Color: stringPtr("#ff79c6"),
839+ BackgroundColor: stringPtr(Background.Dark),
841+ KeywordNamespace: ansi.StylePrimitive{
842+ Color: stringPtr("#ff79c6"),
843+ BackgroundColor: stringPtr(Background.Dark),
845+ KeywordType: ansi.StylePrimitive{
846+ Color: stringPtr("#8be9fd"),
847+ BackgroundColor: stringPtr(Background.Dark),
849+ Operator: ansi.StylePrimitive{
850+ Color: stringPtr("#ff79c6"),
851+ BackgroundColor: stringPtr(Background.Dark),
853+ Punctuation: ansi.StylePrimitive{
854+ Color: stringPtr(Forground.Dark),
855+ BackgroundColor: stringPtr(Background.Dark),
857+ Name: ansi.StylePrimitive{
858+ Color: stringPtr("#8be9fd"),
859+ BackgroundColor: stringPtr(Background.Dark),
861+ NameBuiltin: ansi.StylePrimitive{
862+ Color: stringPtr("#8be9fd"),
863+ BackgroundColor: stringPtr(Background.Dark),
865+ NameTag: ansi.StylePrimitive{
866+ Color: stringPtr("#ff79c6"),
867+ BackgroundColor: stringPtr(Background.Dark),
869+ NameAttribute: ansi.StylePrimitive{
870+ Color: stringPtr("#50fa7b"),
871+ BackgroundColor: stringPtr(Background.Dark),
873+ NameClass: ansi.StylePrimitive{
874+ Color: stringPtr("#8be9fd"),
875+ BackgroundColor: stringPtr(Background.Dark),
877+ NameConstant: ansi.StylePrimitive{
878+ Color: stringPtr("#bd93f9"),
879+ BackgroundColor: stringPtr(Background.Dark),
881+ NameDecorator: ansi.StylePrimitive{
882+ Color: stringPtr("#50fa7b"),
883+ BackgroundColor: stringPtr(Background.Dark),
885+ NameFunction: ansi.StylePrimitive{
886+ Color: stringPtr("#50fa7b"),
887+ BackgroundColor: stringPtr(Background.Dark),
889+ LiteralNumber: ansi.StylePrimitive{
890+ Color: stringPtr("#6EEFC0"),
891+ BackgroundColor: stringPtr(Background.Dark),
893+ LiteralString: ansi.StylePrimitive{
894+ Color: stringPtr("#f1fa8c"),
895+ BackgroundColor: stringPtr(Background.Dark),
897+ LiteralStringEscape: ansi.StylePrimitive{
898+ Color: stringPtr("#ff79c6"),
899+ BackgroundColor: stringPtr(Background.Dark),
901+ GenericDeleted: ansi.StylePrimitive{
902+ Color: stringPtr("#ff5555"),
903+ BackgroundColor: stringPtr(Background.Dark),
905+ GenericEmph: ansi.StylePrimitive{
906+ Color: stringPtr("#f1fa8c"),
907+ Italic: boolPtr(true),
908+ BackgroundColor: stringPtr(Background.Dark),
910+ GenericInserted: ansi.StylePrimitive{
911+ Color: stringPtr("#50fa7b"),
912+ BackgroundColor: stringPtr(Background.Dark),
914+ GenericStrong: ansi.StylePrimitive{
915+ Color: stringPtr("#ffb86c"),
916+ Bold: boolPtr(true),
917+ BackgroundColor: stringPtr(Background.Dark),
919+ GenericSubheading: ansi.StylePrimitive{
920+ Color: stringPtr("#bd93f9"),
921+ BackgroundColor: stringPtr(Background.Dark),
923+ Background: ansi.StylePrimitive{
924+ BackgroundColor: stringPtr(Background.Dark),
928+ Table: ansi.StyleTable{
929+ StyleBlock: ansi.StyleBlock{
930+ StylePrimitive: ansi.StylePrimitive{
931+ BackgroundColor: stringPtr(Background.Dark),
933+ IndentToken: stringPtr(BaseStyle.Render(" ")),
936+ DefinitionDescription: ansi.StylePrimitive{
937+ BlockPrefix: "\n* ",
938+ BackgroundColor: stringPtr(Background.Dark),