aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 5ef81a0..51993ed 100644
--- a/init.lua
+++ b/init.lua
@@ -1,12 +1,20 @@
-- Copyright (c) 2021 Florian Fischer. All rights reserved.
-- Use of this source code is governed by a MIT license found in the LICENSE file.
-- We require vis compiled with the communicate patch
+
+-- forward declaration of our client table
+local lspc
+
local function lspc_warn(msg)
- vis:info('LSPC Warning: ' .. msg)
+ local warning = 'LSPC Warning: ' .. msg
+ lspc.log(warning)
+ vis:info(warning)
end
local function lspc_err(msg)
- vis:info('LSPC Error: ' .. msg)
+ local err = 'LSPC Error: ' .. msg
+ lspc.log(err)
+ vis:info(err)
end
if not vis.communicate then
@@ -70,9 +78,6 @@ do
end
assert(vis_pid)
--- forward declaration of our client table
-local lspc
-
-- logging system
-- if lspc.logging is set to true the first call to lspc.log
-- will open the log file and replace lspc.log with the actual log function