summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-26 19:22:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-26 19:22:57 +0800
commit89fe211184059a3cf00c22ade2c601878341de94 (patch)
treec5d8d65d540b9b4f146e76e97c35e79a13bfbea0 /script
parent863ba7697bacc427c70dad04b33e1ad76da07019 (diff)
downloadlua-language-server-89fe211184059a3cf00c22ade2c601878341de94.zip
fix diagnostics
Diffstat (limited to 'script')
-rw-r--r--script/provider/diagnostic.lua2
-rw-r--r--script/provider/provider.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index cf9500f6..9ab57d9d 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -62,7 +62,7 @@ local function buildSyntaxError(uri, err)
end
local function buildDiagnostic(uri, diag)
- if files.exists(uri) then
+ if not files.exists(uri) then
return
end
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index fe55b4ad..9939d845 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -559,7 +559,7 @@ proto.on('textDocument/codeAction', function (params)
local uri = params.textDocument.uri
local range = params.range
local diagnostics = params.context.diagnostics
- if files.exists(uri) then
+ if not files.exists(uri) then
return nil
end