From 9b31511e377ba6ed7a310a95bc372cc65afba0fa Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sat, 8 Aug 2015 21:02:53 -0400 Subject: Added automatic syntax-checking capability as files are saved. --- modules/lua/init.lua | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'modules/lua') diff --git a/modules/lua/init.lua b/modules/lua/init.lua index f2ae7343..095aec79 100644 --- a/modules/lua/init.lua +++ b/modules/lua/init.lua @@ -115,21 +115,6 @@ function M.try_to_autocomplete_end() return false end --- Show syntax errors as annotations. -events.connect(events.FILE_AFTER_SAVE, function() - if buffer:get_lexer() ~= 'lua' then return end - buffer:annotation_clear_all() - local text = buffer:get_text():gsub('^#![^\n]+', '') -- ignore shebang line - local f, err = load(text) - if f then return end - local line, msg = err:match('^.-:(%d+):%s*(.+)$') - if line then - buffer.annotation_text[line - 1] = msg - buffer.annotation_style[line - 1] = 8 -- error style number - buffer:goto_line(line - 1) - end -end) - --- -- Container for Lua-specific key bindings. -- @class table -- cgit v1.2.3