如何在编辑器中突出显示editorError行

时间:2019-09-26 07:54:56

标签: monaco-editor

可以选择在摩纳哥编辑器中创建自己的主题。

但是如何更改下划线错误样式以突出显示整个字符串?

“摩纳哥编辑”:“ ^ 0.18.1”,

monaco.editor.defineTheme('myCustomTheme', {
            base: 'vs-dark', // can also be vs-dark or hc-black
            inherit: true, // can also be false to completely replace the builtin rules
            rules: [
                { token: 'error', fontStyle: 'bold' },
                // { token: 'comment', foreground: 'ffa500', fontStyle: 'italic underline' },
                // { token: 'comment.js', foreground: '008800', fontStyle: 'bold' },
                // { token: 'comment.css', foreground: '0000ff' } // will inherit fontStyle from `comment` above
            ],
            colors: {
                'editorError.border': '2px solid red',
                'editorError.foreground': 'blue',
                errorForeground: 'red',
                'inputValidation.errorBackground': 'red',
            },
        });

0 个答案:

没有答案
相关问题