diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 17:08:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 17:08:22 +0800 |
commit | 030a4996d3aa2262808bfc3ed92440678df9d00b (patch) | |
tree | 4b13491e8695d7e038a862f7e4dd265ffbeb4219 /server/src | |
parent | 73d85a0172ba551e82487cf62c9565ecd4f2753f (diff) | |
download | lua-language-server-030a4996d3aa2262808bfc3ed92440678df9d00b.zip |
哈希表可以直接传
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/async/scanfiles.lua | 2 | ||||
-rw-r--r-- | server/src/workspace.lua | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/server/src/async/scanfiles.lua b/server/src/async/scanfiles.lua index 650141a2..4829f8e1 100644 --- a/server/src/async/scanfiles.lua +++ b/server/src/async/scanfiles.lua @@ -7,7 +7,7 @@ local ignore = { ['node_modules'] = true, } -for _, name in pairs(args.ignore) do +for name in pairs(args.ignore) do ignore[name] = true end diff --git a/server/src/workspace.lua b/server/src/workspace.lua index 8f51fc11..2fd7ad65 100644 --- a/server/src/workspace.lua +++ b/server/src/workspace.lua @@ -78,14 +78,9 @@ function mt:init(rootUri) log.info('Log path: ', logPath) log.init(ROOT, logPath) - local ignore = {} - for name in pairs(config.config.workspace.ignoreDir) do - ignore[#ignore+1] = name - end - async.run('scanfiles', { root = self.root:string(), - ignore = ignore, + ignore = config.config.workspace.ignoreDir, }, function (file) if file == 'ok' then self:reset() |