summaryrefslogtreecommitdiff
path: root/server/src/async
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-22 17:01:01 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-22 17:01:01 +0800
commitf6cf28b71d81785a29a163a82427a9276744793e (patch)
treec23170a8ded44ff30a8d2f9af06e67dd6c963520 /server/src/async
parent382a83df0058bd6243a06f1129399060c9cb9303 (diff)
downloadlua-language-server-f6cf28b71d81785a29a163a82427a9276744793e.zip
忽略目录也交给后端处理
Diffstat (limited to 'server/src/async')
-rw-r--r--server/src/async/scanfiles.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/async/scanfiles.lua b/server/src/async/scanfiles.lua
index e114eca8..650141a2 100644
--- a/server/src/async/scanfiles.lua
+++ b/server/src/async/scanfiles.lua
@@ -1,14 +1,17 @@
-local root = ...
+local args = ...
require 'utility'
local fs = require 'bee.filesystem'
-local list = {}
local ignore = {
['.git'] = true,
['node_modules'] = true,
}
-for path in io.scan(fs.path(root), ignore) do
+for _, name in pairs(args.ignore) do
+ ignore[name] = true
+end
+
+for path in io.scan(fs.path(args.root), ignore) do
if path:extension():string() == '.lua' then
local buf = io.load(path)
if buf then