From 41b235584feeb492d082cdc7bbb735cc49b08180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 26 Dec 2020 23:18:43 +0100 Subject: lua: fix luacheck warnings These are either accidentally global or unused variables. In the file type pluging the mime type variable was wrongly scoped, meaning the text/plain settings applied to all otherwise unknown files. --- lua/plugins/complete-filename.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/plugins/complete-filename.lua') diff --git a/lua/plugins/complete-filename.lua b/lua/plugins/complete-filename.lua index 03cc313..e955347 100644 --- a/lua/plugins/complete-filename.lua +++ b/lua/plugins/complete-filename.lua @@ -13,7 +13,7 @@ vis:map(vis.modes.INSERT, "", function() local prefix = file:content(range) if not prefix then return end -- Strip leading delimiters for some languages - i, j = string.find(prefix, "[[(<'\"]+") + local _, j = string.find(prefix, "[[(<'\"]+") if j then prefix = prefix:sub(j + 1) end local cmd = string.format("vis-complete --file '%s'", prefix:gsub("'", "'\\''")) local status, out, err = vis:pipe(file, { start = 0, finish = 0 }, cmd) -- cgit v1.2.3