diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-05-10 17:44:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-05-10 17:44:34 +0800 |
commit | 7318bbba9808b94c59202d301ac4faf4dc7f1f5a (patch) | |
tree | 9d82c000652aa31d9770677ba41eadb36874c938 /script/service/service.lua | |
parent | d7e59826b5dec2d6f4b9ba59f6d64af42c078edd (diff) | |
download | lua-language-server-7318bbba9808b94c59202d301ac4faf4dc7f1f5a.zip |
support connecting by socket with `--socket=PORT`
Diffstat (limited to 'script/service/service.lua')
-rw-r--r-- | script/service/service.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/script/service/service.lua b/script/service/service.lua index cd83dd54..7011ec4f 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -267,7 +267,12 @@ function m.start() if COMPILECORES and COMPILECORES > 0 then pub.recruitBraves(COMPILECORES, 'compile') end - proto.listen() + if SOCKET then + assert(math.tointeger(SOCKET), '`socket` must be integer') + proto.listen('socket', SOCKET) + else + proto.listen('stdio') + end m.report() m.testVersion() m.lockCache() |