diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-16 00:11:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-16 00:11:34 +0800 |
commit | 68db6ffa1943bfda316f3e955896f482f1ef109d (patch) | |
tree | c9c909fc0fc48327840937fff56a66c4bd144b20 /server-beta/src | |
parent | 58bd9dd99cf6f927a318085255e4e18b533eab0d (diff) | |
download | lua-language-server-68db6ffa1943bfda316f3e955896f482f1ef109d.zip |
修改一些细节
Diffstat (limited to 'server-beta/src')
-rw-r--r-- | server-beta/src/core/diagnostics/redundant-parameter.lua | 2 | ||||
-rw-r--r-- | server-beta/src/parser/guide.lua | 6 | ||||
-rw-r--r-- | server-beta/src/searcher/getLibrary.lua | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/server-beta/src/core/diagnostics/redundant-parameter.lua b/server-beta/src/core/diagnostics/redundant-parameter.lua index 43bb93ed..a60c8cdb 100644 --- a/server-beta/src/core/diagnostics/redundant-parameter.lua +++ b/server-beta/src/core/diagnostics/redundant-parameter.lua @@ -66,7 +66,7 @@ return function (uri, callback) local func = source.node local funcArgs - searcher.eachRef(func, function (info) + searcher.eachDef(func, function (info) if info.mode == 'value' then local src = info.source if src.type == 'function' then diff --git a/server-beta/src/parser/guide.lua b/server-beta/src/parser/guide.lua index c96f7143..f1fedbd9 100644 --- a/server-beta/src/parser/guide.lua +++ b/server-beta/src/parser/guide.lua @@ -518,14 +518,16 @@ function m.getPath(a, b) local mode local objA local objB - if a.start < b.start then + if a.finish < b.start then mode = 'before' objA = a objB = b - else + elseif a.start > b.finish then mode = 'after' objA = b objB = a + else + return 'equal', {}, {} end local pathA = {} local pathB = {} diff --git a/server-beta/src/searcher/getLibrary.lua b/server-beta/src/searcher/getLibrary.lua index afedde64..b920387d 100644 --- a/server-beta/src/searcher/getLibrary.lua +++ b/server-beta/src/searcher/getLibrary.lua @@ -1,5 +1,4 @@ local searcher = require 'searcher.searcher' -local guide = require 'parser.guide' local library = require 'library' local function getLibrary(source) |