diff options
-rw-r--r-- | server-beta/src/core/diagnostics/newline-call.lua | 2 | ||||
-rw-r--r-- | server-beta/src/core/diagnostics/undefined-global.lua | 4 | ||||
-rw-r--r-- | server-beta/src/provider/init.lua | 2 | ||||
-rw-r--r-- | server-beta/test/diagnostics/init.lua | 7 |
4 files changed, 11 insertions, 4 deletions
diff --git a/server-beta/src/core/diagnostics/newline-call.lua b/server-beta/src/core/diagnostics/newline-call.lua index 52b84197..cb318380 100644 --- a/server-beta/src/core/diagnostics/newline-call.lua +++ b/server-beta/src/core/diagnostics/newline-call.lua @@ -21,7 +21,7 @@ return function (uri, callback) return end - local nodeRow = guide.positionOf(lines, node.start) + local nodeRow = guide.positionOf(lines, node.finish) local argRow = guide.positionOf(lines, args.start) if nodeRow == argRow then return diff --git a/server-beta/src/core/diagnostics/undefined-global.lua b/server-beta/src/core/diagnostics/undefined-global.lua index 921ba086..c3fbccbf 100644 --- a/server-beta/src/core/diagnostics/undefined-global.lua +++ b/server-beta/src/core/diagnostics/undefined-global.lua @@ -43,15 +43,13 @@ return function (uri, callback) end end globalCache[key] = false - local message + local message = lang.script('DIAG_UNDEF_GLOBAL', skey) local otherVersion = library.other[skey] local customVersion = library.custom[skey] if otherVersion then message = ('%s(%s)'):format(message, lang.script('DIAG_DEFINED_VERSION', table.concat(otherVersion, '/'), config.config.runtime.version)) elseif customVersion then message = ('%s(%s)'):format(message, lang.script('DIAG_DEFINED_CUSTOM', table.concat(customVersion, '/'))) - else - message = lang.script('DIAG_UNDEF_GLOBAL', skey) end for _, info in ipairs(infos) do callback { diff --git a/server-beta/src/provider/init.lua b/server-beta/src/provider/init.lua index c4835dce..5f3d2db4 100644 --- a/server-beta/src/provider/init.lua +++ b/server-beta/src/provider/init.lua @@ -7,6 +7,7 @@ local proto = require 'proto.proto' local define = require 'proto.define' local workspace = require 'workspace' local config = require 'config' +local library = require 'library' local function updateConfig() local configs = proto.awaitRequest('workspace/configuration', { @@ -38,6 +39,7 @@ local function updateConfig() local newConfig = config.config local newOther = config.other if not util.equal(oldConfig.runtime, newConfig.runtime) then + library.reload() end if not util.equal(oldConfig.diagnostics, newConfig.diagnostics) then end diff --git a/server-beta/test/diagnostics/init.lua b/server-beta/test/diagnostics/init.lua index 1493494d..aaf51987 100644 --- a/server-beta/test/diagnostics/init.lua +++ b/server-beta/test/diagnostics/init.lua @@ -203,6 +203,13 @@ print() ]] TEST [[ +local x +return x + : f(1) + : f(1) +]] + +TEST [[ return { <!print 'string'!> |