-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(monaco-editor): fix theme conflict
- Loading branch information
Showing
11 changed files
with
159 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
import type { editor } from 'monaco-editor/esm/vs/editor/editor.api' | ||
|
||
export const logRules: editor.ITokenThemeRule[] = [ | ||
{ token: 'log-TRACE', foreground: 'a9a9a9', background: '1e1e1e' }, | ||
{ token: 'log-DEBUG', foreground: '00aaaa', background: '1e1e1e' }, | ||
{ token: 'log-INFO', foreground: '00aa00', background: '1e1e1e' }, | ||
{ token: 'log-WARN', foreground: 'aa5500', background: '1e1e1e' }, | ||
{ token: 'log-ERROR', foreground: 'ff5555', background: '1e1e1e' }, | ||
{ token: 'log-FATAL', foreground: 'aa00aa', background: '1e1e1e' }, | ||
{ token: 'log-MARK', foreground: '555555', background: '1e1e1e' }, | ||
{ token: 'log-date', foreground: '008888', background: '2d2d2d' }, | ||
] | ||
|
||
export const editorLight: editor.IStandaloneThemeData = { | ||
base: 'vs', | ||
inherit: true, | ||
rules: [ | ||
...logRules, | ||
], | ||
colors: {}, | ||
} | ||
|
||
export const editorDark: editor.IStandaloneThemeData = { | ||
base: 'vs-dark', | ||
inherit: true, | ||
rules: [ | ||
...logRules, | ||
{ foreground: '75715e', token: 'comment' }, | ||
{ foreground: 'e6db74', token: 'string' }, | ||
{ foreground: 'ae81ff', token: 'constant.numeric' }, | ||
{ foreground: 'ae81ff', token: 'constant.language' }, | ||
{ foreground: 'ae81ff', token: 'constant.character' }, | ||
{ foreground: 'ae81ff', token: 'constant.other' }, | ||
{ foreground: 'f92672', token: 'keyword' }, | ||
{ foreground: 'f92672', token: 'storage' }, | ||
{ foreground: '66d9ef', fontStyle: 'italic', token: 'storage.type' }, | ||
{ foreground: 'a6e22e', fontStyle: 'underline', token: 'entity.name.class' }, | ||
{ foreground: 'a6e22e', fontStyle: 'italic underline', token: 'entity.other.inherited-class' }, | ||
{ foreground: 'a6e22e', token: 'entity.name.function' }, | ||
{ foreground: 'fd971f', fontStyle: 'italic', token: 'variable.parameter' }, | ||
{ foreground: 'f92672', token: 'entity.name.tag' }, | ||
{ foreground: 'a6e22e', token: 'entity.other.attribute-name' }, | ||
{ foreground: '66d9ef', token: 'support.function' }, | ||
{ foreground: '66d9ef', token: 'support.constant' }, | ||
{ foreground: '66d9ef', fontStyle: 'italic', token: 'support.type' }, | ||
{ foreground: '66d9ef', fontStyle: 'italic', token: 'support.class' }, | ||
{ foreground: 'f8f8f0', background: 'f92672', token: 'invalid' }, | ||
{ foreground: 'f8f8f0', background: 'ae81ff', token: 'invalid.deprecated' }, | ||
{ foreground: 'cfcfc2', token: 'meta.structure.dictionary.json string.quoted.double.json' }, | ||
{ foreground: '75715e', token: 'meta.diff' }, | ||
{ foreground: '75715e', token: 'meta.diff.header' }, | ||
{ foreground: 'f92672', token: 'markup.deleted' }, | ||
{ foreground: 'a6e22e', token: 'markup.inserted' }, | ||
{ foreground: 'e6db74', token: 'markup.changed' }, | ||
{ foreground: 'ae81ffa0', token: 'constant.numeric.line-number.find-in-files - match' }, | ||
{ foreground: 'e6db74', token: 'entity.name.filename.find-in-files' }, | ||
], | ||
colors: { | ||
'editor.foreground': '#F8F8F2', | ||
'editor.background': '#282828', | ||
'editor.selectionBackground': '#49483E', | ||
'editor.lineHighlightBackground': '#3E3D32', | ||
'editorCursor.foreground': '#F8F8F0', | ||
'editorWhitespace.foreground': '#3B3A32', | ||
'editorIndentGuide.activeBackground': '#9D550FB0', | ||
'editor.selectionHighlightBorder': '#222218', | ||
}, | ||
} | ||
|
||
export const editorNight: editor.IStandaloneThemeData = { | ||
base: 'vs-dark', | ||
inherit: true, | ||
rules: [ | ||
...logRules, | ||
{ foreground: '75715e', token: 'comment' }, | ||
{ foreground: 'e6db74', token: 'string' }, | ||
{ foreground: 'ae81ff', token: 'constant.numeric' }, | ||
{ foreground: 'ae81ff', token: 'constant.language' }, | ||
{ foreground: 'ae81ff', token: 'constant.character' }, | ||
{ foreground: 'ae81ff', token: 'constant.other' }, | ||
{ foreground: 'f92672', token: 'keyword' }, | ||
{ foreground: 'f92672', token: 'storage' }, | ||
{ foreground: '66d9ef', fontStyle: 'italic', token: 'storage.type' }, | ||
{ foreground: 'a6e22e', fontStyle: 'underline', token: 'entity.name.class' }, | ||
{ foreground: 'a6e22e', fontStyle: 'italic underline', token: 'entity.other.inherited-class' }, | ||
{ foreground: 'a6e22e', token: 'entity.name.function' }, | ||
{ foreground: 'fd971f', fontStyle: 'italic', token: 'variable.parameter' }, | ||
{ foreground: 'f92672', token: 'entity.name.tag' }, | ||
{ foreground: 'a6e22e', token: 'entity.other.attribute-name' }, | ||
{ foreground: '66d9ef', token: 'support.function' }, | ||
{ foreground: '66d9ef', token: 'support.constant' }, | ||
{ foreground: '66d9ef', fontStyle: 'italic', token: 'support.type' }, | ||
{ foreground: '66d9ef', fontStyle: 'italic', token: 'support.class' }, | ||
{ foreground: 'f8f8f0', background: 'f92672', token: 'invalid' }, | ||
{ foreground: 'f8f8f0', background: 'ae81ff', token: 'invalid.deprecated' }, | ||
{ foreground: 'cfcfc2', token: 'meta.structure.dictionary.json string.quoted.double.json' }, | ||
{ foreground: '75715e', token: 'meta.diff' }, | ||
{ foreground: '75715e', token: 'meta.diff.header' }, | ||
{ foreground: 'f92672', token: 'markup.deleted' }, | ||
{ foreground: 'a6e22e', token: 'markup.inserted' }, | ||
{ foreground: 'e6db74', token: 'markup.changed' }, | ||
{ foreground: 'ae81ffa0', token: 'constant.numeric.line-number.find-in-files - match' }, | ||
{ foreground: 'e6db74', token: 'entity.name.filename.find-in-files' }, | ||
], | ||
colors: { | ||
'editor.foreground': '#F8F8F2', | ||
'editor.background': '#292B33', | ||
'editor.selectionBackground': '#49483E', | ||
'editor.lineHighlightBackground': '#3E3D32', | ||
'editorCursor.foreground': '#F8F8F0', | ||
'editorWhitespace.foreground': '#3B3A32', | ||
'editorIndentGuide.activeBackground': '#9D550FB0', | ||
'editor.selectionHighlightBorder': '#222218', | ||
}, | ||
} |
Oops, something went wrong.