Add log language highlighting
This commit is contained in:
@@ -17,6 +17,7 @@ import themes, { Theme } from '../style/themes';
|
||||
|
||||
import type { editor } from 'monaco-editor';
|
||||
import { ResetFunction } from './Editor';
|
||||
import { logLanguage } from '../util/log-language';
|
||||
|
||||
export interface EditorTextAreaProps {
|
||||
forcedContent: string;
|
||||
@@ -60,6 +61,9 @@ export default function EditorTextArea({
|
||||
monaco.editor.defineTheme(theme.id, theme.editor);
|
||||
}
|
||||
|
||||
monaco.languages.register({ id: 'log' });
|
||||
monaco.languages.setMonarchTokensProvider('log', logLanguage);
|
||||
|
||||
monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
|
||||
noSemanticValidation: true,
|
||||
noSyntaxValidation: true,
|
||||
|
||||
Reference in New Issue
Block a user