mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:30:04 +08:00
refactor(a.lua): remove debug info in parse function
This commit is contained in:
parent
a1203d63d8
commit
08e7fa0584
@ -106,9 +106,7 @@ local function _keys(val)
|
||||
return new_keys
|
||||
end
|
||||
local function _comp(a, b)
|
||||
if (string.match(a, '*') == '*'
|
||||
and string.match(b, '*') == '*')
|
||||
then
|
||||
if (string.match(a, '*') == '*' and string.match(b, '*') == '*') then
|
||||
return #a < #b
|
||||
elseif string.match(a, '*') == '*' then
|
||||
return true
|
||||
@ -128,7 +126,6 @@ local function parse(alt_config_json)
|
||||
local keys = _keys(alt_config_json.config)
|
||||
table.sort(keys, _comp)
|
||||
for _, key in pairs(keys) do
|
||||
logger.debug('start parse key:' .. key)
|
||||
local searchpath = key
|
||||
if string.match(searchpath, '*') == '*' then
|
||||
searchpath = string.gsub(searchpath, '*', '**/*')
|
||||
@ -136,7 +133,6 @@ local function parse(alt_config_json)
|
||||
logger.debug('run globpath for: '.. searchpath)
|
||||
for _,file in pairs(cmp.globpath('.', searchpath)) do
|
||||
file = sp_file.unify_path(file, ':.')
|
||||
logger.debug(file)
|
||||
project_config[alt_config_json.root][file] = {}
|
||||
if alt_config_json.config[file] ~= nil then
|
||||
for alt_type, type_v in pairs(alt_config_json.config[file]) do
|
||||
|
Loading…
Reference in New Issue
Block a user