Skip to content

Commit

Permalink
feat(syntax): add support for markdown in quarto documents (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
juba committed Apr 24, 2024
1 parent ff56108 commit 723a024
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions packages/catppuccin-vsc/src/theme/tokens/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const tokens = (context: ThemeContext): TextmateColors => {
scope: [
"heading.1.markdown punctuation.definition.heading.markdown",
"heading.1.markdown",
"heading.1.quarto punctuation.definition.heading.quarto",
"heading.1.quarto",
"markup.heading.atx.1.mdx",
"markup.heading.atx.1.mdx punctuation.definition.heading.mdx",
"markup.heading.setext.1.markdown",
Expand All @@ -21,6 +23,8 @@ const tokens = (context: ThemeContext): TextmateColors => {
scope: [
"heading.2.markdown punctuation.definition.heading.markdown",
"heading.2.markdown",
"heading.2.quarto punctuation.definition.heading.quarto",
"heading.2.quarto",
"markup.heading.atx.2.mdx",
"markup.heading.atx.2.mdx punctuation.definition.heading.mdx",
"markup.heading.setext.2.markdown",
Expand All @@ -34,6 +38,8 @@ const tokens = (context: ThemeContext): TextmateColors => {
scope: [
"heading.3.markdown punctuation.definition.heading.markdown",
"heading.3.markdown",
"heading.3.quarto punctuation.definition.heading.quarto",
"heading.3.quarto",
"markup.heading.atx.3.mdx",
"markup.heading.atx.3.mdx punctuation.definition.heading.mdx",
"markup.heading.heading-2.asciidoc",
Expand All @@ -46,6 +52,8 @@ const tokens = (context: ThemeContext): TextmateColors => {
scope: [
"heading.4.markdown punctuation.definition.heading.markdown",
"heading.4.markdown",
"heading.4.quarto punctuation.definition.heading.quarto",
"heading.4.quarto",
"markup.heading.atx.4.mdx",
"markup.heading.atx.4.mdx punctuation.definition.heading.mdx",
"markup.heading.heading-3.asciidoc",
Expand All @@ -58,6 +66,8 @@ const tokens = (context: ThemeContext): TextmateColors => {
scope: [
"heading.5.markdown punctuation.definition.heading.markdown",
"heading.5.markdown",
"heading.5.quarto punctuation.definition.heading.quarto",
"heading.5.quarto",
"markup.heading.atx.5.mdx",
"markup.heading.atx.5.mdx punctuation.definition.heading.mdx",
"markup.heading.heading-4.asciidoc",
Expand All @@ -70,6 +80,8 @@ const tokens = (context: ThemeContext): TextmateColors => {
scope: [
"heading.6.markdown punctuation.definition.heading.markdown",
"heading.6.markdown",
"heading.6.quarto punctuation.definition.heading.quarto",
"heading.6.quarto",
"markup.heading.atx.6.mdx",
"markup.heading.atx.6.mdx punctuation.definition.heading.mdx",
"markup.heading.heading-5.asciidoc",
Expand Down Expand Up @@ -110,12 +122,16 @@ const tokens = (context: ThemeContext): TextmateColors => {
name: "Markdown links",
scope: [
"text.html.markdown punctuation.definition.link.title",
"text.html.quarto punctuation.definition.link.title",
"string.other.link.title.markdown",
"string.other.link.title.quarto",
"markup.link",
// references like
// > [1]: http://example.com "Example"
"punctuation.definition.constant.markdown",
"punctuation.definition.constant.quarto",
"constant.other.reference.link.markdown",
"constant.other.reference.link.quarto",
"markup.substitution.attribute-reference",
],
settings: {
Expand All @@ -126,8 +142,11 @@ const tokens = (context: ThemeContext): TextmateColors => {
name: "Markdown code spans",
scope: [
"punctuation.definition.raw.markdown",
"punctuation.definition.raw.quarto",
"markup.inline.raw.string.markdown",
"markup.inline.raw.string.quarto",
"markup.raw.block.markdown",
"markup.raw.block.quarto",
],
settings: {
foreground: palette.green,
Expand Down Expand Up @@ -168,12 +187,20 @@ const tokens = (context: ThemeContext): TextmateColors => {
name: "Markdown list bullets",
scope: [
"punctuation.definition.list.begin.markdown",
"punctuation.definition.list.begin.quarto",
"markup.list.bullet",
],
settings: {
foreground: palette.teal,
},
},
{
name: "Quarto headings",
scope: "markup.heading.quarto",
settings: {
fontStyle: "bold",
},
},
];
};

Expand Down

0 comments on commit 723a024

Please sign in to comment.