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/texinfo.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexlua/texinfo.lua') diff --git a/lexlua/texinfo.lua b/lexlua/texinfo.lua index bb5ba55c6..a5a7148cb 100644 --- a/lexlua/texinfo.lua +++ b/lexlua/texinfo.lua @@ -182,11 +182,11 @@ local nested_braces = lexer.range('{', '}', false, false, true) -- Italics lex:add_rule('emph', token('emph', '@emph' * nested_braces)) -lex:add_style('emph', lexer.STYLE_STRING .. ',italics') +lex:add_style('emph', lexer.STYLE_STRING .. {italics = true}) -- Bold lex:add_rule('strong', token('strong', '@strong' * nested_braces)) -lex:add_style('strong', lexer.STYLE_STRING .. ',bold') +lex:add_style('strong', lexer.STYLE_STRING .. {bold = true}) -- Identifiers lex:add_rule('identifier', token(lexer.IDENTIFIER, lexer.word)) -- cgit v1.2.3