summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-23 19:49:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-23 19:49:19 +0800
commit01b87570e6d8f2655ebc0e5a33258735b857f228 (patch)
tree93d31ab492f402fc255e095d15ea2c34217ee0b0 /script/provider
parent4fbcb7b75aa0ea18fac6c4b77fcdee97921f36bc (diff)
downloadlua-language-server-01b87570e6d8f2655ebc0e5a33258735b857f228.zip
should use origin uri in diagnostic relative
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/diagnostic.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 52ba3f87..6f67d92c 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -44,9 +44,10 @@ local function buildSyntaxError(uri, err)
else
rmessage = text:sub(rel.start, rel.finish)
end
+ local relUri = files.getOriginUri(rel.uri)
relatedInformation[#relatedInformation+1] = {
message = rmessage,
- location = define.location(uri, files.range(uri, rel.start, rel.finish)),
+ location = define.location(relUri, files.range(relUri, rel.start, rel.finish)),
}
end
end