diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-30 18:18:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-30 18:18:11 +0800 |
commit | 56303121277f5ebf9668ca9f3fc886392df83a16 (patch) | |
tree | e6d9e3ac201ada250ba4c7abe18c52a2720a67a9 /server/src | |
parent | 2d3adf951e189fd3679125254f42797e3265f6d6 (diff) | |
download | lua-language-server-56303121277f5ebf9668ca9f3fc886392df83a16.zip |
标准输入和标准输出都不缓冲
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/service.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index c361bd78..9f05ad1b 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -19,6 +19,8 @@ local function listen(self, input, output) else subprocess.filemode(io.stdout, 'b') end + io.input():setvbuf 'no' + io.output():setvbuf 'no' local session = lsp() local cache = '' @@ -51,7 +53,6 @@ local function listen(self, input, output) end) session:setOutput(function (buf) io.write(buf) - io.flush() end) session:setMethod(function (method, params) local optional |