ScintillaNET Lua 代码折叠

github上有Cpp的示例代码,但是把Lexer改成LUA后没有效果,折腾了好久终于发现问题

首先需要把代码折叠的关键词设置到 Keywords 0 里面

_editor.SetKeywords(0, "and break do else elseif end for function if in local nil not or repeat return then until while" + " false true" + " goto");
            

然后打开代码折叠功能。

_editor.SetProperty("fold", "1");
 _editor.SetProperty("fold.compact", "0"); // 这个一定要关掉!!!否则折叠样式会有问题!!!

你可能感兴趣的:(Winform,c#)