vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 8cd22c123010b3b329e00fec04434c40cef57bd5 parent 666e828ce26dd3da23503d03290ea21ccb24ba86 Author: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Sun, 18 Aug 2024 16:27:39 -0400 Improve performance of the text lexer Instead of highlighting non-whitespace characters one at a time, highlight whole ranges. Diffstat:
| M | lua/lexers/text.lua | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lua/lexers/text.lua b/lua/lexers/text.lua @@ -7,4 +7,6 @@ local lex = lexer.new('text') lex:add_rule('whitespace', lexer.token(lexer.WHITESPACE, lexer.space^1)) +lex:add_rule('text', lexer.token(lexer.DEFAULT, (1 - lexer.space)^1)) + return lex