From 78fd2201b9d9027a2e0961a9a74e3b6ff604de6d Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Fri, 11 Aug 2023 11:44:53 -0600 Subject: lua: update default plugins to work with scintillua 6.2 vis{,-std}.lua: * replace removed _TOKENSTYLES with _TAGS * don't add default styles to the lexer. lexers no longer define their own styles filetype.lua: update path detection for scintillua 6.2 --- lua/vis-std.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'lua/vis-std.lua') diff --git a/lua/vis-std.lua b/lua/vis-std.lua index 8b5715b..5dd13eb 100644 --- a/lua/vis-std.lua +++ b/lua/vis-std.lua @@ -27,17 +27,6 @@ vis:option_register("theme", "string", function(name) end end - local styles = lexers.styles - local default_styles = { - 'nothing', 'whitespace', 'comment', 'string', 'number', 'keyword', - 'identifier', 'operator', 'error', 'preprocessor', 'constant', 'variable', - 'function', 'class', 'type', 'label', 'regex', 'embedded' - } - - for _, s in ipairs(default_styles) do - styles[s] = lexers['STYLE_' .. s:upper()] - end - for win in vis:windows() do win:set_syntax(win.syntax) end @@ -73,7 +62,7 @@ vis.events.subscribe(vis.events.WIN_HIGHLIGHT, function(win) local lex_start = viewport.start - horizon viewport.start = lex_start local data = win.file:content(viewport) - local token_styles = lexer._TOKENSTYLES + local token_styles = lexer._TAGS local tokens = lexer:lex(data, 1) local token_end = lex_start + (tokens[#tokens] or 1) - 1 -- cgit v1.2.3