1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

feat(tasks): display background or not

This commit is contained in:
wsdjeg 2022-11-01 01:33:00 +08:00
parent 3db40b345a
commit 9b5703af57

View File

@ -24,6 +24,7 @@ local function show_taskconfig(opts)
separator = ' ',
items = {
{ width = 25 },
{ width = 10 },
{ width = 15 },
{ remaining = true },
},
@ -43,9 +44,15 @@ local function show_taskconfig(opts)
elseif entry.value.task.isDetected == 1 then
task_type = 'detected'
end
-- @todo the text maybe changed
local background = 'no-background'
if entry.value.task.isBackground == 1 then
background = 'background'
end
return displayer({
{ '[' .. entry.value.name .. ']', 'TelescopeResultsVariable' },
{ '[' .. task_type .. ']', 'TelescopeResultsNumber' },
{ '[' .. background .. ']', 'TelescopeResultsNumber' },
{ desc, 'TelescopeResultsComment' },
})
end