From 5ed7ded384aca2cff4d09401cc852f7943a1ea94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 5 Apr 2019 19:06:24 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/method/textDocument/publishDiagnostics.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/src/method') diff --git a/server/src/method/textDocument/publishDiagnostics.lua b/server/src/method/textDocument/publishDiagnostics.lua index fbe65bb3..f2e1a593 100644 --- a/server/src/method/textDocument/publishDiagnostics.lua +++ b/server/src/method/textDocument/publishDiagnostics.lua @@ -1,5 +1,6 @@ local core = require 'core' local lang = require 'language' +local config = require 'config' local DiagnosticSeverity = { Error = 1, @@ -84,9 +85,9 @@ local function buildError(err, lines, uri) } if err.version then if type(err.version) == 'table' then - diagnostic.message = ('%s(%s)'):format(diagnostic.message, lang.script('DIAG_NEED_VERSION', table.concat(err.version, '/'))) + diagnostic.message = ('%s(%s)'):format(diagnostic.message, lang.script('DIAG_NEED_VERSION', table.concat(err.version, '/'), config.config.runtime.version)) else - diagnostic.message = ('%s(%s)'):format(diagnostic.message, lang.script('DIAG_NEED_VERSION', err.version)) + diagnostic.message = ('%s(%s)'):format(diagnostic.message, lang.script('DIAG_NEED_VERSION', err.version, config.config.runtime.version)) end end if err.level == 'error' then -- cgit v1.2.3