summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-10 12:14:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-10 12:14:44 +0800
commit3ecf1f3050877af26f65cf54ba2c252a84eebb26 (patch)
tree7757fe162dd61d1f08387f9942d7502c3d661d4b /server
parent603517f930aade8c4a78875db8611c5e738aa6c7 (diff)
downloadlua-language-server-3ecf1f3050877af26f65cf54ba2c252a84eebb26.zip
Revert "findLib改个名"
This reverts commit 603517f930aade8c4a78875db8611c5e738aa6c7.
Diffstat (limited to 'server')
-rw-r--r--server/src/matcher/diagnostics.lua4
-rw-r--r--server/src/matcher/find_lib.lua (renamed from server/src/matcher/find_lib_full.lua)0
-rw-r--r--server/src/matcher/hover.lua6
-rw-r--r--server/src/matcher/init.lua2
-rw-r--r--server/test/find_lib/init.lua2
5 files changed, 7 insertions, 7 deletions
diff --git a/server/src/matcher/diagnostics.lua b/server/src/matcher/diagnostics.lua
index 1a966065..0a4c149f 100644
--- a/server/src/matcher/diagnostics.lua
+++ b/server/src/matcher/diagnostics.lua
@@ -1,4 +1,4 @@
-local findLibFull = require 'matcher.find_lib_full'
+local findLib = require 'matcher.find_lib'
local function searchUnusedLocals(results, callback)
for _, var in ipairs(results.vars) do
@@ -37,7 +37,7 @@ local function searchUndefinedGlobal(results, callback)
if not var.key:find '%l' then
goto NEXT_VAR
end
- local lib = findLibFull(var)
+ local lib = findLib(var)
if lib then
goto NEXT_VAR
end
diff --git a/server/src/matcher/find_lib_full.lua b/server/src/matcher/find_lib.lua
index f24dabd4..f24dabd4 100644
--- a/server/src/matcher/find_lib_full.lua
+++ b/server/src/matcher/find_lib.lua
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index 53d774d6..9faa426b 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -1,5 +1,5 @@
-local findResult = require 'matcher.find_result'
-local findLibFull = require 'matcher.find_lib_full'
+local findResult = require 'matcher.find_result'
+local findLib = require 'matcher.find_lib'
local Cache = {}
local OoCache = {}
@@ -170,7 +170,7 @@ return function (results, pos)
return nil
end
local var = result.var
- local lib, fullKey, oo = findLibFull(var)
+ local lib, fullKey, oo = findLib(var)
if not lib then
return nil
end
diff --git a/server/src/matcher/init.lua b/server/src/matcher/init.lua
index d7b41b78..eda4ac7b 100644
--- a/server/src/matcher/init.lua
+++ b/server/src/matcher/init.lua
@@ -8,7 +8,7 @@ local api = {
compile = require 'matcher.compile',
typeInference = require 'matcher.type_inference',
findResult = require 'matcher.find_result',
- findLibFull = require 'matcher.find_lib_full',
+ findLib = require 'matcher.find_lib',
}
return api
diff --git a/server/test/find_lib/init.lua b/server/test/find_lib/init.lua
index ed71a17a..26dbc893 100644
--- a/server/test/find_lib/init.lua
+++ b/server/test/find_lib/init.lua
@@ -18,7 +18,7 @@ function TEST(fullkey)
assert(result.type == 'var')
local var = result.var
assert(var)
- local _, name = matcher.findLibFull(var)
+ local _, name = matcher.findLib(var)
assert(name == fullkey)
end
end