mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:20:04 +08:00
fix(layer): fix find_layers function
close https://github.com/SpaceVim/SpaceVim/issues/4825
This commit is contained in:
parent
f7ccafb114
commit
1d4406b5ca
@ -38,11 +38,6 @@ local function find_layers()
|
||||
local status = ''
|
||||
local url = ''
|
||||
local website = ''
|
||||
if M.isLoaded(name) then
|
||||
status = 'loaded'
|
||||
else
|
||||
status = 'not loaded'
|
||||
end
|
||||
if name == 'lsp' then
|
||||
url = 'language-server-protocol'
|
||||
else
|
||||
@ -54,6 +49,11 @@ local function find_layers()
|
||||
website = 'no exists'
|
||||
end
|
||||
name = sp.fn.substitute(name, '/', '#','g')
|
||||
if M.isLoaded(name) then
|
||||
status = 'loaded'
|
||||
else
|
||||
status = 'not loaded'
|
||||
end
|
||||
if status == 'loaded' then
|
||||
table.insert(rst, '+ ' .. name .. ':' .. sp.fn['repeat'](' ', 25 - sp.fn.len(name)) .. status .. sp.fn['repeat'](' ', 10) .. website)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user