aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2021-03-08 12:06:55 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2021-03-08 12:06:55 +0100
commit2c7553a237784ea746c7a397e7df7fa91db23379 (patch)
treed74d9dc7c26945631059e2f8e1ff9251e1750b06
parentbdd5d68aaa121f98bf2320f96a9bb3ad340a2ad3 (diff)
downloadvis-lspc-2c7553a237784ea746c7a397e7df7fa91db23379.tar.gz
vis-lspc-2c7553a237784ea746c7a397e7df7fa91db23379.zip
suppress luacheck upshadowing warnings for the event handler code
-rw-r--r--init.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 1a36fa8..145d21e 100644
--- a/init.lua
+++ b/init.lua
@@ -627,8 +627,9 @@ local function lspc_open(ls, win, file)
ls.open_files[file.path] = {file = file, version = 0}
ls_send_notification(ls, 'textDocument/didOpen', params)
- vis.events.subscribe(vis.events.FILE_CLOSE, function(file)
- for _, ls in pairs(lspc.running) do
+ vis.events.subscribe(vis.events.FILE_CLOSE,
+ function(file) -- luacheck: ignore file
+ for _, ls in pairs(lspc.running) do -- luacheck: ignore ls
if ls.open_files[file.path] then
lspc_close(ls, file)
end
@@ -637,10 +638,11 @@ local function lspc_open(ls, win, file)
-- the server is interested in didSave notifications
if ls.capabilities.textDocumentSync.save then
- vis.events.subscribe(vis.events.FILE_SAVE_POST, function(file, path)
- for _, ls in pairs(lspc.running) do
+ vis.events.subscribe(vis.events.FILE_SAVE_POST,
+ function(file, path) -- luacheck: ignore file
+ for _, ls in pairs(lspc.running) do -- luacheck: ignore ls
if ls.open_files[file.path] then
- local params = {textDocument = {uri = path_to_uri(path)}}
+ local params = {textDocument = {uri = path_to_uri(path)}} -- luacheck: ignore params
ls_send_notification(ls, 'textDocument/didSave', params)
end
end