From 822b2c913c7d6690221eabf9b252850fb7c32513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 14 Dec 2016 21:39:30 +0100 Subject: lua: improve error message when failing to load lpeg/lexer module Differentiate between the case where the module is not found and the case where an error occured while loading it. This should make it easier to debug cases in which there is a Lua version mismatch between vis and lpeg. --- lua/vis.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lua/vis.lua') diff --git a/lua/vis.lua b/lua/vis.lua index 97350a7..f1aff45 100644 --- a/lua/vis.lua +++ b/lua/vis.lua @@ -5,14 +5,7 @@ --- -- @type Vis -local ok, msg = pcall(function() - vis.lexers = {} - vis.lexers = require('lexer') -end) - -if not ok then - vis:info('WARNING: could not load lexer module, is lpeg installed?') -end +vis.lexers = {} --- Map a new motion. -- -- cgit v1.2.3