mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(themes): drive code block syntax highlighting from active theme
This commit is contained in:
1 parent
479adcc719
commit
6396e8c22c
10 files changed
+971
-48
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,22 @@
|
||||
export type HexColor = `#${string}`
|
||||
|
||||
export const OPENCODE_SYNTAX_TOKENS = [
|
||||
'comment',
|
||||
'keyword',
|
||||
'string',
|
||||
'primitive',
|
||||
'property',
|
||||
'type',
|
||||
'constant',
|
||||
'variable',
|
||||
'operator',
|
||||
'punctuation',
|
||||
] as const
|
||||
|
||||
export type OpenCodeSyntaxToken = (typeof OPENCODE_SYNTAX_TOKENS)[number]
|
||||
|
||||
export type OpenCodeSyntaxPalette = Partial<Record<OpenCodeSyntaxToken, HexColor>>
|
||||
|
||||
export interface OpenCodeThemePalette {
|
||||
neutral: HexColor
|
||||
ink: HexColor
|
||||
@@ -12,6 +29,7 @@ export interface OpenCodeThemePalette {
|
||||
diffAdd?: HexColor
|
||||
diffDelete?: HexColor
|
||||
textWeak?: HexColor
|
||||
syntax?: OpenCodeSyntaxPalette
|
||||
}
|
||||
|
||||
export interface OpenCodeThemeDefinition {
|
||||
|
||||
Reference in new issue
Block a user