问题描述
想知道,是否可以自定义语法错误信息?
Just wondering, if the syntax error gutter can be customized? Also is it possible to highlight texts which has syntax error?
例如下面的示例,我正在尝试检查 myString 反对字符串 chetan,但不带引号。现在,这是语法错误。当前,我们在行号之前的装订线中显示错误。但是是否可以自定义ace编辑器以提供内联突出显示并更改颜色?
For example below I am trying to check value of
myString
against string a "chetan" but without quotes. Now this is a syntax error. Currently we display the error in gutter prior to line number. But is it possible to customize the ace editor provide inline highlight and change the color?
if myString==chetan:
//do something
endif
推荐答案
您可以添加类似于cloud9和zed的下划线(请参见)或修改荧光笔令牌,请参见
You can add underline similar to the way cloud9 and zed do (see https://github.com/zedapp/zed/commit/59ae66c545db2ad92dc5efc1a069edd16960ebdd) or modify highlighter tokens see https://groups.google.com/d/msg/ace-discuss/_PRUJ_HemNo/wvDf9FqwzhMJ
这篇关于Ace编辑器:定制语法错误信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!