aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/complete-filename.lua
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2020-12-26 23:18:43 +0100
committerMarc André Tanner <mat@brain-dump.org>2020-12-27 11:29:50 +0100
commit41b235584feeb492d082cdc7bbb735cc49b08180 (patch)
treee965e35b2f00240611794707e9e75c18f4f89474 /lua/plugins/complete-filename.lua
parent40c387aca214f701cd316c63b290ba7f35abbe3a (diff)
downloadvis-41b235584feeb492d082cdc7bbb735cc49b08180.tar.gz
vis-41b235584feeb492d082cdc7bbb735cc49b08180.tar.xz
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.
Diffstat (limited to 'lua/plugins/complete-filename.lua')
-rw-r--r--lua/plugins/complete-filename.lua2
1 files changed, 1 insertions, 1 deletions
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, "<C-x><C-f>", 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)