wip: desktop work

This commit is contained in:
Adam
2025-10-24 16:04:44 -05:00
parent 6b82153263
commit fea6a357bc
3 changed files with 659 additions and 91 deletions

View File

@@ -1,4 +1,10 @@
import { type FileContents, FileDiff, type DiffLineAnnotation, DiffFileRendererOptions } from "@pierre/precision-diffs" import {
type FileContents,
FileDiff,
type DiffLineAnnotation,
DiffFileRendererOptions,
registerCustomTheme,
} from "@pierre/precision-diffs"
import { ComponentProps, createEffect, splitProps } from "solid-js" import { ComponentProps, createEffect, splitProps } from "solid-js"
export type DiffProps<T = {}> = Omit<DiffFileRendererOptions<T>, "themes"> & { export type DiffProps<T = {}> = Omit<DiffFileRendererOptions<T>, "themes"> & {
@@ -9,6 +15,9 @@ export type DiffProps<T = {}> = Omit<DiffFileRendererOptions<T>, "themes"> & {
classList?: ComponentProps<"div">["classList"] classList?: ComponentProps<"div">["classList"]
} }
// @ts-expect-error
registerCustomTheme("opencode", () => import("./theme.json"))
// interface ThreadMetadata { // interface ThreadMetadata {
// threadId: string // threadId: string
// } // }
@@ -40,7 +49,7 @@ export function Diff<T>(props: DiffProps<T>) {
// annotations and a container element to hold the diff // annotations and a container element to hold the diff
createEffect(() => { createEffect(() => {
const instance = new FileDiff<T>({ const instance = new FileDiff<T>({
theme: "pierre-light", theme: "opencode",
// Or can also provide a 'themes' prop, which allows the code to adapt // Or can also provide a 'themes' prop, which allows the code to adapt
// to your OS light or dark theme // to your OS light or dark theme
// themes: { dark: 'pierre-night', light: 'pierre-light' }, // themes: { dark: 'pierre-night', light: 'pierre-light' },

View File

@@ -0,0 +1,558 @@
{
"colors": {
"actionBar.toggledBackground": "var(--surface-raised-base)",
"activityBarBadge.background": "var(--surface-brand-base)",
"checkbox.border": "var(--border-base)",
"editor.background": "transparent",
"editor.foreground": "var(--text-base)",
"editor.inactiveSelectionBackground": "var(--surface-raised-base)",
"editor.selectionHighlightBackground": "var(--border-active)",
"editorIndentGuide.activeBackground1": "var(--border-weak-base)",
"editorIndentGuide.background1": "var(--border-weak-base)",
"input.placeholderForeground": "var(--text-weak)",
"list.activeSelectionIconForeground": "var(--text-base)",
"list.dropBackground": "var(--surface-raised-base)",
"menu.background": "var(--surface-base)",
"menu.border": "var(--border-base)",
"menu.foreground": "var(--text-base)",
"menu.selectionBackground": "var(--surface-interactive-base)",
"menu.separatorBackground": "var(--border-base)",
"ports.iconRunningProcessForeground": "var(--icon-success-base)",
"sideBarSectionHeader.background": "transparent",
"sideBarSectionHeader.border": "var(--border-weak-base)",
"sideBarTitle.foreground": "var(--text-weak)",
"statusBarItem.remoteBackground": "var(--surface-success-base)",
"statusBarItem.remoteForeground": "var(--text-base)",
"tab.lastPinnedBorder": "var(--border-weak-base)",
"tab.selectedBackground": "var(--surface-raised-base)",
"tab.selectedForeground": "var(--text-weak)",
"terminal.inactiveSelectionBackground": "var(--surface-raised-base)",
"widget.border": "var(--border-base)"
},
"displayName": "opencode",
"name": "opencode",
"semanticHighlighting": true,
"semanticTokenColors": {
"customLiteral": "var(--syntax-function)",
"newOperator": "var(--syntax-operator)",
"numberLiteral": "var(--syntax-number)",
"stringLiteral": "var(--syntax-string)"
},
"tokenColors": [
{
"scope": [
"meta.embedded",
"source.groovy.embedded",
"string meta.image.inline.markdown",
"variable.legacy.builtin.python"
],
"settings": {
"foreground": "var(--text-base)"
}
},
{
"scope": "emphasis",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "strong",
"settings": {
"fontStyle": "bold"
}
},
{
"scope": "header",
"settings": {
"foreground": "var(--markdown-heading)"
}
},
{
"scope": "comment",
"settings": {
"foreground": "var(--syntax-comment)"
}
},
{
"scope": "constant.language",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": [
"constant.numeric",
"variable.other.enummember",
"keyword.operator.plus.exponent",
"keyword.operator.minus.exponent"
],
"settings": {
"foreground": "var(--syntax-number)"
}
},
{
"scope": "constant.regexp",
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": "entity.name.tag",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": ["entity.name.tag.css", "entity.name.tag.less"],
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": "entity.other.attribute-name",
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": [
"entity.other.attribute-name.class.css",
"source.css entity.other.attribute-name.class",
"entity.other.attribute-name.id.css",
"entity.other.attribute-name.parent-selector.css",
"entity.other.attribute-name.parent.less",
"source.css entity.other.attribute-name.pseudo-class",
"entity.other.attribute-name.pseudo-element.css",
"source.css.less entity.other.attribute-name.id",
"entity.other.attribute-name.scss"
],
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": "invalid",
"settings": {
"foreground": "var(--syntax-critical)"
}
},
{
"scope": "markup.underline",
"settings": {
"fontStyle": "underline"
}
},
{
"scope": "markup.bold",
"settings": {
"fontStyle": "bold",
"foreground": "var(--markdown-strong)"
}
},
{
"scope": "markup.heading",
"settings": {
"fontStyle": "bold",
"foreground": "var(--theme-markdown-heading)"
}
},
{
"scope": "markup.italic",
"settings": {
"fontStyle": "italic"
}
},
{
"scope": "markup.strikethrough",
"settings": {
"fontStyle": "strikethrough"
}
},
{
"scope": "markup.inserted",
"settings": {
"foreground": "var(--text-diff-add-base)"
}
},
{
"scope": "markup.deleted",
"settings": {
"foreground": "var(--text-diff-delete-base)"
}
},
{
"scope": "markup.changed",
"settings": {
"foreground": "var(--text-base)"
}
},
{
"scope": "punctuation.definition.quote.begin.markdown",
"settings": {
"foreground": "var(--markdown-block-quote)"
}
},
{
"scope": "punctuation.definition.list.begin.markdown",
"settings": {
"foreground": "var(--markdown-list-enumeration)"
}
},
{
"scope": "markup.inline.raw",
"settings": {
"foreground": "var(--markdown-code)"
}
},
{
"scope": "punctuation.definition.tag",
"settings": {
"foreground": "var(--syntax-punctuation)"
}
},
{
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "meta.preprocessor.string",
"settings": {
"foreground": "var(--syntax-string)"
}
},
{
"scope": "meta.preprocessor.numeric",
"settings": {
"foreground": "var(--syntax-number)"
}
},
{
"scope": "meta.structure.dictionary.key.python",
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": "meta.diff.header",
"settings": {
"foreground": "var(--text-weak)"
}
},
{
"scope": "storage",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "storage.type",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": ["storage.modifier", "keyword.operator.noexcept"],
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": ["string", "meta.embedded.assembly"],
"settings": {
"foreground": "var(--syntax-string)"
}
},
{
"scope": "string.tag",
"settings": {
"foreground": "var(--syntax-string)"
}
},
{
"scope": "string.value",
"settings": {
"foreground": "var(--syntax-string)"
}
},
{
"scope": "string.regexp",
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": [
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"punctuation.section.embedded"
],
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": ["meta.template.expression"],
"settings": {
"foreground": "var(--text-base)"
}
},
{
"scope": [
"support.type.vendored.property-name",
"support.type.property-name",
"source.css variable",
"source.coffee.embedded"
],
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": "keyword",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "keyword.control",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "keyword.operator",
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": [
"keyword.operator.new",
"keyword.operator.expression",
"keyword.operator.cast",
"keyword.operator.sizeof",
"keyword.operator.alignof",
"keyword.operator.typeid",
"keyword.operator.alignas",
"keyword.operator.instanceof",
"keyword.operator.logical.python",
"keyword.operator.wordlike"
],
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "keyword.other.unit",
"settings": {
"foreground": "var(--syntax-number)"
}
},
{
"scope": ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"],
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "support.function.git-rebase",
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": "constant.sha.git-rebase",
"settings": {
"foreground": "var(--syntax-number)"
}
},
{
"scope": ["storage.modifier.import.java", "variable.language.wildcard.java", "storage.modifier.package.java"],
"settings": {
"foreground": "var(--text-base)"
}
},
{
"scope": "variable.language",
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": [
"entity.name.function",
"support.function",
"support.constant.handlebars",
"source.powershell variable.other.member",
"entity.name.operator.custom-literal"
],
"settings": {
"foreground": "var(--syntax-function)"
}
},
{
"scope": [
"support.class",
"support.type",
"entity.name.type",
"entity.name.namespace",
"entity.other.attribute",
"entity.name.scope-resolution",
"entity.name.class",
"storage.type.numeric.go",
"storage.type.byte.go",
"storage.type.boolean.go",
"storage.type.string.go",
"storage.type.uintptr.go",
"storage.type.error.go",
"storage.type.rune.go",
"storage.type.cs",
"storage.type.generic.cs",
"storage.type.modifier.cs",
"storage.type.variable.cs",
"storage.type.annotation.java",
"storage.type.generic.java",
"storage.type.java",
"storage.type.object.array.java",
"storage.type.primitive.array.java",
"storage.type.primitive.java",
"storage.type.token.java",
"storage.type.groovy",
"storage.type.annotation.groovy",
"storage.type.parameters.groovy",
"storage.type.generic.groovy",
"storage.type.object.array.groovy",
"storage.type.primitive.array.groovy",
"storage.type.primitive.groovy"
],
"settings": {
"foreground": "var(--syntax-type)"
}
},
{
"scope": [
"meta.type.cast.expr",
"meta.type.new.expr",
"support.constant.math",
"support.constant.dom",
"support.constant.json",
"entity.other.inherited-class",
"punctuation.separator.namespace.ruby"
],
"settings": {
"foreground": "var(--syntax-type)"
}
},
{
"scope": [
"keyword.control",
"source.cpp keyword.operator.new",
"keyword.operator.delete",
"keyword.other.using",
"keyword.other.directive.using",
"keyword.other.operator",
"entity.name.operator"
],
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": [
"variable",
"meta.definition.variable.name",
"support.variable",
"entity.name.variable",
"constant.other.placeholder"
],
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": ["variable.other.constant", "variable.other.enummember"],
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": ["meta.object-literal.key"],
"settings": {
"foreground": "var(--syntax-variable)"
}
},
{
"scope": [
"support.constant.property-value",
"support.constant.font-name",
"support.constant.media-type",
"support.constant.media",
"constant.other.color.rgb-value",
"constant.other.rgb-value",
"support.constant.color"
],
"settings": {
"foreground": "var(--syntax-string)"
}
},
{
"scope": [
"punctuation.definition.group.regexp",
"punctuation.definition.group.assertion.regexp",
"punctuation.definition.character-class.regexp",
"punctuation.character.set.begin.regexp",
"punctuation.character.set.end.regexp",
"keyword.operator.negation.regexp",
"support.other.parenthesis.regexp"
],
"settings": {
"foreground": "var(--syntax-string)"
}
},
{
"scope": [
"constant.character.character-class.regexp",
"constant.other.character-class.set.regexp",
"constant.other.character-class.regexp",
"constant.character.set.regexp"
],
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": "keyword.operator.quantifier.regexp",
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": ["constant.character", "constant.other.option"],
"settings": {
"foreground": "var(--syntax-keyword)"
}
},
{
"scope": "constant.character.escape",
"settings": {
"foreground": "var(--syntax-operator)"
}
},
{
"scope": "entity.name.label",
"settings": {
"foreground": "var(--text-weak)"
}
}
],
"type": "dark"
}

View File

@@ -3,43 +3,43 @@ import { createHighlighter, type ThemeInput } from "shiki"
const theme: ThemeInput = { const theme: ThemeInput = {
colors: { colors: {
"actionBar.toggledBackground": "var(--theme-background-element)", "actionBar.toggledBackground": "var(--surface-raised-base)",
"activityBarBadge.background": "var(--theme-accent)", "activityBarBadge.background": "var(--surface-brand-base)",
"checkbox.border": "var(--theme-border)", "checkbox.border": "var(--border-base)",
"editor.background": "transparent", "editor.background": "transparent",
"editor.foreground": "var(--theme-text)", "editor.foreground": "var(--text-base)",
"editor.inactiveSelectionBackground": "var(--theme-background-element)", "editor.inactiveSelectionBackground": "var(--surface-raised-base)",
"editor.selectionHighlightBackground": "var(--theme-border-active)", "editor.selectionHighlightBackground": "var(--border-active)",
"editorIndentGuide.activeBackground1": "var(--theme-border-subtle)", "editorIndentGuide.activeBackground1": "var(--border-weak-base)",
"editorIndentGuide.background1": "var(--theme-border-subtle)", "editorIndentGuide.background1": "var(--border-weak-base)",
"input.placeholderForeground": "var(--theme-text-muted)", "input.placeholderForeground": "var(--text-weak)",
"list.activeSelectionIconForeground": "var(--theme-text)", "list.activeSelectionIconForeground": "var(--text-base)",
"list.dropBackground": "var(--theme-background-element)", "list.dropBackground": "var(--surface-raised-base)",
"menu.background": "var(--theme-background-panel)", "menu.background": "var(--surface-base)",
"menu.border": "var(--theme-border)", "menu.border": "var(--border-base)",
"menu.foreground": "var(--theme-text)", "menu.foreground": "var(--text-base)",
"menu.selectionBackground": "var(--theme-primary)", "menu.selectionBackground": "var(--surface-interactive-base)",
"menu.separatorBackground": "var(--theme-border)", "menu.separatorBackground": "var(--border-base)",
"ports.iconRunningProcessForeground": "var(--theme-success)", "ports.iconRunningProcessForeground": "var(--icon-success-base)",
"sideBarSectionHeader.background": "transparent", "sideBarSectionHeader.background": "transparent",
"sideBarSectionHeader.border": "var(--theme-border-subtle)", "sideBarSectionHeader.border": "var(--border-weak-base)",
"sideBarTitle.foreground": "var(--theme-text-muted)", "sideBarTitle.foreground": "var(--text-weak)",
"statusBarItem.remoteBackground": "var(--theme-success)", "statusBarItem.remoteBackground": "var(--surface-success-base)",
"statusBarItem.remoteForeground": "var(--theme-text)", "statusBarItem.remoteForeground": "var(--text-base)",
"tab.lastPinnedBorder": "var(--theme-border-subtle)", "tab.lastPinnedBorder": "var(--border-weak-base)",
"tab.selectedBackground": "var(--theme-background-element)", "tab.selectedBackground": "var(--surface-raised-base)",
"tab.selectedForeground": "var(--theme-text-muted)", "tab.selectedForeground": "var(--text-weak)",
"terminal.inactiveSelectionBackground": "var(--theme-background-element)", "terminal.inactiveSelectionBackground": "var(--surface-raised-base)",
"widget.border": "var(--theme-border)", "widget.border": "var(--border-base)",
}, },
displayName: "opencode", displayName: "opencode",
name: "opencode", name: "opencode",
semanticHighlighting: true, semanticHighlighting: true,
semanticTokenColors: { semanticTokenColors: {
customLiteral: "var(--theme-syntax-function)", customLiteral: "var(--syntax-function)",
newOperator: "var(--theme-syntax-operator)", newOperator: "var(--syntax-operator)",
numberLiteral: "var(--theme-syntax-number)", numberLiteral: "var(--syntax-number)",
stringLiteral: "var(--theme-syntax-string)", stringLiteral: "var(--syntax-string)",
}, },
tokenColors: [ tokenColors: [
{ {
@@ -50,7 +50,7 @@ const theme: ThemeInput = {
"variable.legacy.builtin.python", "variable.legacy.builtin.python",
], ],
settings: { settings: {
foreground: "var(--theme-text)", foreground: "var(--text-base)",
}, },
}, },
{ {
@@ -68,19 +68,19 @@ const theme: ThemeInput = {
{ {
scope: "header", scope: "header",
settings: { settings: {
foreground: "var(--theme-markdown-heading)", foreground: "var(--markdown-heading)",
}, },
}, },
{ {
scope: "comment", scope: "comment",
settings: { settings: {
foreground: "var(--theme-syntax-comment)", foreground: "var(--syntax-comment)",
}, },
}, },
{ {
scope: "constant.language", scope: "constant.language",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
@@ -91,31 +91,31 @@ const theme: ThemeInput = {
"keyword.operator.minus.exponent", "keyword.operator.minus.exponent",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-number)", foreground: "var(--syntax-number)",
}, },
}, },
{ {
scope: "constant.regexp", scope: "constant.regexp",
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: "entity.name.tag", scope: "entity.name.tag",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: ["entity.name.tag.css", "entity.name.tag.less"], scope: ["entity.name.tag.css", "entity.name.tag.less"],
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: "entity.other.attribute-name", scope: "entity.other.attribute-name",
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
@@ -131,13 +131,13 @@ const theme: ThemeInput = {
"entity.other.attribute-name.scss", "entity.other.attribute-name.scss",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: "invalid", scope: "invalid",
settings: { settings: {
foreground: "var(--theme-error)", foreground: "var(--syntax-critical)",
}, },
}, },
{ {
@@ -150,7 +150,7 @@ const theme: ThemeInput = {
scope: "markup.bold", scope: "markup.bold",
settings: { settings: {
fontStyle: "bold", fontStyle: "bold",
foreground: "var(--theme-markdown-strong)", foreground: "var(--markdown-strong)",
}, },
}, },
{ {
@@ -175,115 +175,115 @@ const theme: ThemeInput = {
{ {
scope: "markup.inserted", scope: "markup.inserted",
settings: { settings: {
foreground: "var(--theme-diff-added)", foreground: "var(--text-diff-add-base)",
}, },
}, },
{ {
scope: "markup.deleted", scope: "markup.deleted",
settings: { settings: {
foreground: "var(--theme-diff-removed)", foreground: "var(--text-diff-delete-base)",
}, },
}, },
{ {
scope: "markup.changed", scope: "markup.changed",
settings: { settings: {
foreground: "var(--theme-diff-context)", foreground: "var(--text-base)",
}, },
}, },
{ {
scope: "punctuation.definition.quote.begin.markdown", scope: "punctuation.definition.quote.begin.markdown",
settings: { settings: {
foreground: "var(--theme-markdown-block-quote)", foreground: "var(--markdown-block-quote)",
}, },
}, },
{ {
scope: "punctuation.definition.list.begin.markdown", scope: "punctuation.definition.list.begin.markdown",
settings: { settings: {
foreground: "var(--theme-markdown-list-enumeration)", foreground: "var(--markdown-list-enumeration)",
}, },
}, },
{ {
scope: "markup.inline.raw", scope: "markup.inline.raw",
settings: { settings: {
foreground: "var(--theme-markdown-code)", foreground: "var(--markdown-code)",
}, },
}, },
{ {
scope: "punctuation.definition.tag", scope: "punctuation.definition.tag",
settings: { settings: {
foreground: "var(--theme-syntax-punctuation)", foreground: "var(--syntax-punctuation)",
}, },
}, },
{ {
scope: ["meta.preprocessor", "entity.name.function.preprocessor"], scope: ["meta.preprocessor", "entity.name.function.preprocessor"],
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "meta.preprocessor.string", scope: "meta.preprocessor.string",
settings: { settings: {
foreground: "var(--theme-syntax-string)", foreground: "var(--syntax-string)",
}, },
}, },
{ {
scope: "meta.preprocessor.numeric", scope: "meta.preprocessor.numeric",
settings: { settings: {
foreground: "var(--theme-syntax-number)", foreground: "var(--syntax-number)",
}, },
}, },
{ {
scope: "meta.structure.dictionary.key.python", scope: "meta.structure.dictionary.key.python",
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
scope: "meta.diff.header", scope: "meta.diff.header",
settings: { settings: {
foreground: "var(--theme-diff-hunk-header)", foreground: "var(--text-weak)",
}, },
}, },
{ {
scope: "storage", scope: "storage",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "storage.type", scope: "storage.type",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: ["storage.modifier", "keyword.operator.noexcept"], scope: ["storage.modifier", "keyword.operator.noexcept"],
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: ["string", "meta.embedded.assembly"], scope: ["string", "meta.embedded.assembly"],
settings: { settings: {
foreground: "var(--theme-syntax-string)", foreground: "var(--syntax-string)",
}, },
}, },
{ {
scope: "string.tag", scope: "string.tag",
settings: { settings: {
foreground: "var(--theme-syntax-string)", foreground: "var(--syntax-string)",
}, },
}, },
{ {
scope: "string.value", scope: "string.value",
settings: { settings: {
foreground: "var(--theme-syntax-string)", foreground: "var(--syntax-string)",
}, },
}, },
{ {
scope: "string.regexp", scope: "string.regexp",
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
@@ -293,13 +293,13 @@ const theme: ThemeInput = {
"punctuation.section.embedded", "punctuation.section.embedded",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: ["meta.template.expression"], scope: ["meta.template.expression"],
settings: { settings: {
foreground: "var(--theme-text)", foreground: "var(--text-base)",
}, },
}, },
{ {
@@ -310,25 +310,25 @@ const theme: ThemeInput = {
"source.coffee.embedded", "source.coffee.embedded",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
scope: "keyword", scope: "keyword",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "keyword.control", scope: "keyword.control",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "keyword.operator", scope: "keyword.operator",
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
@@ -345,43 +345,43 @@ const theme: ThemeInput = {
"keyword.operator.wordlike", "keyword.operator.wordlike",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "keyword.other.unit", scope: "keyword.other.unit",
settings: { settings: {
foreground: "var(--theme-syntax-number)", foreground: "var(--syntax-number)",
}, },
}, },
{ {
scope: ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"], scope: ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"],
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "support.function.git-rebase", scope: "support.function.git-rebase",
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
scope: "constant.sha.git-rebase", scope: "constant.sha.git-rebase",
settings: { settings: {
foreground: "var(--theme-syntax-number)", foreground: "var(--syntax-number)",
}, },
}, },
{ {
scope: ["storage.modifier.import.java", "variable.language.wildcard.java", "storage.modifier.package.java"], scope: ["storage.modifier.import.java", "variable.language.wildcard.java", "storage.modifier.package.java"],
settings: { settings: {
foreground: "var(--theme-text)", foreground: "var(--text-base)",
}, },
}, },
{ {
scope: "variable.language", scope: "variable.language",
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
@@ -393,7 +393,7 @@ const theme: ThemeInput = {
"entity.name.operator.custom-literal", "entity.name.operator.custom-literal",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-function)", foreground: "var(--syntax-function)",
}, },
}, },
{ {
@@ -432,7 +432,7 @@ const theme: ThemeInput = {
"storage.type.primitive.groovy", "storage.type.primitive.groovy",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-type)", foreground: "var(--syntax-type)",
}, },
}, },
{ {
@@ -446,7 +446,7 @@ const theme: ThemeInput = {
"punctuation.separator.namespace.ruby", "punctuation.separator.namespace.ruby",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-type)", foreground: "var(--syntax-type)",
}, },
}, },
{ {
@@ -460,7 +460,7 @@ const theme: ThemeInput = {
"entity.name.operator", "entity.name.operator",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
@@ -472,19 +472,19 @@ const theme: ThemeInput = {
"constant.other.placeholder", "constant.other.placeholder",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
scope: ["variable.other.constant", "variable.other.enummember"], scope: ["variable.other.constant", "variable.other.enummember"],
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
scope: ["meta.object-literal.key"], scope: ["meta.object-literal.key"],
settings: { settings: {
foreground: "var(--theme-syntax-variable)", foreground: "var(--syntax-variable)",
}, },
}, },
{ {
@@ -498,7 +498,7 @@ const theme: ThemeInput = {
"support.constant.color", "support.constant.color",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-string)", foreground: "var(--syntax-string)",
}, },
}, },
{ {
@@ -512,7 +512,7 @@ const theme: ThemeInput = {
"support.other.parenthesis.regexp", "support.other.parenthesis.regexp",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-string)", foreground: "var(--syntax-string)",
}, },
}, },
{ {
@@ -523,42 +523,43 @@ const theme: ThemeInput = {
"constant.character.set.regexp", "constant.character.set.regexp",
], ],
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"], scope: ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: "keyword.operator.quantifier.regexp", scope: "keyword.operator.quantifier.regexp",
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: ["constant.character", "constant.other.option"], scope: ["constant.character", "constant.other.option"],
settings: { settings: {
foreground: "var(--theme-syntax-keyword)", foreground: "var(--syntax-keyword)",
}, },
}, },
{ {
scope: "constant.character.escape", scope: "constant.character.escape",
settings: { settings: {
foreground: "var(--theme-syntax-operator)", foreground: "var(--syntax-operator)",
}, },
}, },
{ {
scope: "entity.name.label", scope: "entity.name.label",
settings: { settings: {
foreground: "var(--theme-text-muted)", foreground: "var(--text-weak)",
}, },
}, },
], ],
type: "dark", type: "dark",
} }
const highlighter = await createHighlighter({ const highlighter = await createHighlighter({
themes: [theme], themes: [theme],
langs: [], langs: [],