fix(extension): fix some extension showing a section in whole line
For now use a dummy component to lualine_x on extensions that only define lualine_a. This will let the renderer know right sections do exist. closes #73
This commit is contained in:
parent
05314de43a
commit
846e5bdabf
|
@ -4,10 +4,18 @@ local function fzf_statusline()
|
|||
return 'FZF'
|
||||
end
|
||||
|
||||
local empty = {
|
||||
function()
|
||||
return ' '
|
||||
end,
|
||||
padding = 0,
|
||||
}
|
||||
|
||||
local M = {}
|
||||
|
||||
M.sections = {
|
||||
lualine_a = { fzf_statusline },
|
||||
lualine_x = { empty },
|
||||
}
|
||||
|
||||
M.filetypes = { 'fzf' }
|
||||
|
|
|
@ -4,10 +4,18 @@ local function get_short_cwd()
|
|||
return vim.fn.fnamemodify(vim.fn.getcwd(), ':~')
|
||||
end
|
||||
|
||||
local empty = {
|
||||
function()
|
||||
return ' '
|
||||
end,
|
||||
padding = 0,
|
||||
}
|
||||
|
||||
local M = {}
|
||||
|
||||
M.sections = {
|
||||
lualine_a = { get_short_cwd },
|
||||
lualine_x = { empty },
|
||||
}
|
||||
|
||||
M.filetypes = { 'nerdtree' }
|
||||
|
|
|
@ -5,10 +5,18 @@ local function toggleterm_statusline()
|
|||
return 'ToggleTerm #' .. vim.b.toggle_number
|
||||
end
|
||||
|
||||
local empty = {
|
||||
function()
|
||||
return ' '
|
||||
end,
|
||||
padding = 0,
|
||||
}
|
||||
|
||||
local M = {}
|
||||
|
||||
M.sections = {
|
||||
lualine_a = { toggleterm_statusline },
|
||||
lualine_x = { empty },
|
||||
}
|
||||
|
||||
M.filetypes = { 'toggleterm' }
|
||||
|
|
Loading…
Reference in New Issue