summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/publishDiagnostics.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-03 19:55:07 +0800
committersumneko <sumneko@hotmail.com>2019-04-03 19:55:07 +0800
commitcfcf85156ea3f74e0697421b74cd3f9fdb0f91cf (patch)
tree4478a463a2fbc38b10f34c9ceb36040a266138d5 /server/src/method/textDocument/publishDiagnostics.lua
parent5edda40151d5eed6605009346217d1da3bcb9ae6 (diff)
downloadlua-language-server-cfcf85156ea3f74e0697421b74cd3f9fdb0f91cf.zip
语法错误的版本
Diffstat (limited to 'server/src/method/textDocument/publishDiagnostics.lua')
-rw-r--r--server/src/method/textDocument/publishDiagnostics.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/method/textDocument/publishDiagnostics.lua b/server/src/method/textDocument/publishDiagnostics.lua
index 9385c657..ed5ea99d 100644
--- a/server/src/method/textDocument/publishDiagnostics.lua
+++ b/server/src/method/textDocument/publishDiagnostics.lua
@@ -82,6 +82,9 @@ local function buildError(err, lines, uri)
source = lang.script.DIAG_SYNTAX_CHECK,
message = lang.script('PARSER_'..err.type, err.info)
}
+ if err.version then
+ diagnostic.message = ('%s(%s)'):format(diagnostic.message, lang.script('DIAG_NEED_VERSION', err.version))
+ end
if err.level == 'error' then
diagnostic.severity = DiagnosticSeverity.Error
else