From 329559b74b483576a74d5f87eebf951bd12b9200 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 7 Jul 2020 20:14:11 -0400 Subject: lexlua: Added `lexer.colors` and `lexer.styles` tables for themes and lexers. This allows for a more Lua table-oriented approach to defining and using colors and styles, instead of manually manipulating Scintilla property strings. Themes and lexers are still backwards compatible, as the underlying mechanisms are still in place. --- lexlua/lua.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexlua/lua.lua') diff --git a/lexlua/lua.lua b/lexlua/lua.lua index 655f237f5..7c5a83de8 100644 --- a/lexlua/lua.lua +++ b/lexlua/lua.lua @@ -32,7 +32,7 @@ local deprecated_func = token('deprecated_function', word_match[[ getfenv loadstring module setfenv unpack ]]) lex:add_rule('function', func + deprecated_func) -lex:add_style('deprecated_function', lexer.STYLE_FUNCTION .. ',italics') +lex:add_style('deprecated_function', lexer.STYLE_FUNCTION .. {italics = true}) -- Constants. lex:add_rule('constant', token(lexer.CONSTANT, word_match[[ @@ -103,7 +103,7 @@ local deprecated_library = token('deprecated_library', word_match[[ ]]) lex:add_rule('library', library + deprecated_library) lex:add_style('library', lexer.STYLE_TYPE) -lex:add_style('deprecated_library', lexer.STYLE_TYPE .. ',italics') +lex:add_style('deprecated_library', lexer.STYLE_TYPE .. {italics = true}) -- Identifiers. lex:add_rule('identifier', token(lexer.IDENTIFIER, lexer.word)) -- cgit v1.2.3