mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00: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 status = ''
|
||||||
local url = ''
|
local url = ''
|
||||||
local website = ''
|
local website = ''
|
||||||
if M.isLoaded(name) then
|
|
||||||
status = 'loaded'
|
|
||||||
else
|
|
||||||
status = 'not loaded'
|
|
||||||
end
|
|
||||||
if name == 'lsp' then
|
if name == 'lsp' then
|
||||||
url = 'language-server-protocol'
|
url = 'language-server-protocol'
|
||||||
else
|
else
|
||||||
@ -54,6 +49,11 @@ local function find_layers()
|
|||||||
website = 'no exists'
|
website = 'no exists'
|
||||||
end
|
end
|
||||||
name = sp.fn.substitute(name, '/', '#','g')
|
name = sp.fn.substitute(name, '/', '#','g')
|
||||||
|
if M.isLoaded(name) then
|
||||||
|
status = 'loaded'
|
||||||
|
else
|
||||||
|
status = 'not loaded'
|
||||||
|
end
|
||||||
if status == 'loaded' then
|
if status == 'loaded' then
|
||||||
table.insert(rst, '+ ' .. name .. ':' .. sp.fn['repeat'](' ', 25 - sp.fn.len(name)) .. status .. sp.fn['repeat'](' ', 10) .. website)
|
table.insert(rst, '+ ' .. name .. ':' .. sp.fn['repeat'](' ', 25 - sp.fn.len(name)) .. status .. sp.fn['repeat'](' ', 10) .. website)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user