diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-06-25 00:09:40 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-06-25 00:09:40 +0800 |
commit | e00a622f2a2c34df1f39762a16a3db17ed521d43 (patch) | |
tree | 60c106381d54f652fcbd34b0a3bd15f3aab0d983 | |
parent | 514161461839360e8e452c4657987134484f7e95 (diff) | |
download | lua-language-server-e00a622f2a2c34df1f39762a16a3db17ed521d43.zip |
整理代码
-rw-r--r-- | .vscode/settings.json | 3 | ||||
-rw-r--r-- | server/src/async/async.lua | 2 | ||||
-rw-r--r-- | server/src/meta.lua | 2 | ||||
-rw-r--r-- | server/src/meta/type.lua | 4 | ||||
-rw-r--r-- | server/src/service.lua | 1 |
5 files changed, 8 insertions, 4 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index c33c094c..23d65348 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,7 @@ "server/src/3rd", ], "Lua.workspace.library": { - "E:/Github/test" : true + "E:/Github/test" : true, + "server/src/meta" : true } } diff --git a/server/src/async/async.lua b/server/src/async/async.lua index 3401c346..644a4061 100644 --- a/server/src/async/async.lua +++ b/server/src/async/async.lua @@ -36,7 +36,7 @@ local function task() }, { __index = _ENV }) local f, err = load(dump, '=task', 't', env) if not f then - errlog:push(err) + errlog:push(err .. '\n' .. dump) return end local result = f(arg) diff --git a/server/src/meta.lua b/server/src/meta.lua deleted file mode 100644 index c6fb3a38..00000000 --- a/server/src/meta.lua +++ /dev/null @@ -1,2 +0,0 @@ ----@class uri string ----@class path diff --git a/server/src/meta/type.lua b/server/src/meta/type.lua new file mode 100644 index 00000000..9b47d5bc --- /dev/null +++ b/server/src/meta/type.lua @@ -0,0 +1,4 @@ +---@class uri string +---@class path + +"This is syntax error, due to `workspace.library`, this error never shows." diff --git a/server/src/service.lua b/server/src/service.lua index 0026fb05..0eb5e625 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -288,6 +288,7 @@ function mt:readLibrary(uri, path, buf, compiled) self._files:save(uri, buf, 0) self._files:setLibrary(uri) self:needCompile(uri, compiled) + self:clearDiagnostics(uri) end ---@param uri uri |