vim/lualine: visual tweaks
This commit is contained in:
parent
6732736fa4
commit
e811bdd871
1 changed files with 19 additions and 9 deletions
|
@ -11,7 +11,7 @@ local colored_when_focused = function(component)
|
||||||
return new
|
return new
|
||||||
end
|
end
|
||||||
|
|
||||||
local diff = colored_when_focused('lualine.components.diff')
|
local diagnostics = colored_when_focused('lualine.components.diagnostics')
|
||||||
|
|
||||||
local branch = {
|
local branch = {
|
||||||
'branch',
|
'branch',
|
||||||
|
@ -74,23 +74,34 @@ local mode = {
|
||||||
end)()
|
end)()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local mode_placeholder = {
|
||||||
|
function()
|
||||||
|
return ' '
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
local paste = {
|
local paste = {
|
||||||
function() return '' end,
|
function() return '' end,
|
||||||
color = { bg = '#fe8019' },
|
color = { bg = '#fe8019' },
|
||||||
cond = function() return vim.opt.paste:get() end
|
cond = function() return vim.opt.paste:get() end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local paste_placeholder = {
|
||||||
|
function() return ' ' end,
|
||||||
|
cond = function() return vim.opt.paste:get() end
|
||||||
|
}
|
||||||
|
|
||||||
local status = {
|
local status = {
|
||||||
function()
|
function()
|
||||||
local flags = vim.list_extend(
|
local flags = vim.list_extend(
|
||||||
vim.bo.modified and { '+' } or {},
|
vim.bo.modified and { '✶' } or {},
|
||||||
(vim.bo.readonly or not vim.bo.modifiable) and { 'RO' } or {})
|
(vim.bo.readonly or not vim.bo.modifiable) and { 'RO' } or {})
|
||||||
return vim.fn.join(flags, ' ')
|
return vim.fn.join(flags, ' ')
|
||||||
end,
|
end,
|
||||||
|
|
||||||
color = {
|
color = {
|
||||||
fg = '#eee8d5',
|
fg = '#f9f5d7',
|
||||||
gui = 'bold'
|
gui = 'bold',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,10 +115,10 @@ local visual_multi = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
local default = {
|
local default = {
|
||||||
lualine_a = {},
|
lualine_a = { paste_placeholder, mode_placeholder },
|
||||||
lualine_b = { visual_multi, branch },
|
lualine_b = { visual_multi, branch },
|
||||||
lualine_c = { diff, filename, status },
|
lualine_c = { filename, status },
|
||||||
lualine_x = { filetype },
|
lualine_x = { diagnostics, filetype },
|
||||||
lualine_y = { fileformat, 'progress' },
|
lualine_y = { fileformat, 'progress' },
|
||||||
lualine_z = { 'location' },
|
lualine_z = { 'location' },
|
||||||
}
|
}
|
||||||
|
@ -115,8 +126,7 @@ local default = {
|
||||||
M.sections = {
|
M.sections = {
|
||||||
inactive = default,
|
inactive = default,
|
||||||
active = vim.tbl_extend('force', default, {
|
active = vim.tbl_extend('force', default, {
|
||||||
lualine_a = vim.list_extend({ paste, mode }, default.lualine_a),
|
lualine_a = { paste, mode },
|
||||||
lualine_x = vim.list_extend({ 'diagnostics' }, default.lualine_x),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue