diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-08-27 22:03:10 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-08-27 22:16:14 +0200 |
| commit | 85a3fe068c572f6b3487c40cc3e962687c8998a7 (patch) | |
| tree | defa3ef0ad0db92b6334a8a2cde857d13c5636e7 | |
| parent | fdc6e201533c4d2e0409dbda4ebedbf625ac0c63 (diff) | |
| download | vis-lspc-85a3fe068c572f6b3487c40cc3e962687c8998a7.tar.gz vis-lspc-85a3fe068c572f6b3487c40cc3e962687c8998a7.zip | |
reorder early initialization code
| -rw-r--r-- | init.lua | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,4 +1,4 @@ --- Copyright (c) 2021-2023 Florian Fischer. All rights reserved. +-- Copyright (c) 2021-2024 Florian Fischer. All rights reserved. -- -- This file is part of vis-lspc. -- @@ -15,19 +15,20 @@ -- vis-lspc found in the LICENSE file. If not, see <https://www.gnu.org/licenses/>. -- -- We require vis compiled with the communicate patch -local source_str = debug.getinfo(1, 'S').source:sub(2) -local source_path = source_str:match('(.*/)') - -local parser = dofile(source_path .. 'parser.lua') - if not vis.communicate then vis:info('LSPC Error: language server support requires vis communicate patch') return {} end +local source_str = debug.getinfo(1, 'S').source:sub(2) +local source_path = source_str:match('(.*/)') + -- state of our language server client local lspc = dofile(source_path .. 'lspc.lua') +local parser = dofile(source_path .. 'parser.lua') + +-- load a suitable json module lspc.json = dofile(source_path .. 'json.lua') local jsonrpc = {} |
