|
|
@ -19,7 +19,9 @@ local colors = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
local conditions = {
|
|
|
|
local conditions = {
|
|
|
|
buffer_not_empty = function() return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 end,
|
|
|
|
buffer_not_empty = function()
|
|
|
|
|
|
|
|
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
|
|
|
|
|
|
|
|
end,
|
|
|
|
hide_in_width = function() return vim.fn.winwidth(0) > 80 end,
|
|
|
|
hide_in_width = function() return vim.fn.winwidth(0) > 80 end,
|
|
|
|
check_git_workspace = function()
|
|
|
|
check_git_workspace = function()
|
|
|
|
local filepath = vim.fn.expand('%:p:h')
|
|
|
|
local filepath = vim.fn.expand('%:p:h')
|
|
|
@ -40,8 +42,18 @@ local config = {
|
|
|
|
-- We are going to use lualine_c an lualine_x as left and
|
|
|
|
-- We are going to use lualine_c an lualine_x as left and
|
|
|
|
-- right section. Both are highlighted by c theme . So we
|
|
|
|
-- right section. Both are highlighted by c theme . So we
|
|
|
|
-- are just setting default looks o statusline
|
|
|
|
-- are just setting default looks o statusline
|
|
|
|
normal = {c = {fg = colors.fg, bg = colors.bg}},
|
|
|
|
normal = {
|
|
|
|
inactive = {c = {fg = colors.fg, bg = colors.bg}}
|
|
|
|
c = {
|
|
|
|
|
|
|
|
fg = colors.fg,
|
|
|
|
|
|
|
|
bg = colors.bg
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
inactive = {
|
|
|
|
|
|
|
|
c = {
|
|
|
|
|
|
|
|
fg = colors.fg,
|
|
|
|
|
|
|
|
bg = colors.bg
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
sections = {
|
|
|
@ -77,7 +89,9 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
ins_left {
|
|
|
|
ins_left {
|
|
|
|
function() return '▊' end,
|
|
|
|
function() return '▊' end,
|
|
|
|
color = {fg = colors.blue}, -- Sets highlighting of component
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.blue
|
|
|
|
|
|
|
|
}, -- Sets highlighting of component
|
|
|
|
left_padding = 0 -- We don't need space before this
|
|
|
|
left_padding = 0 -- We don't need space before this
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -107,8 +121,8 @@ ins_left {
|
|
|
|
['!'] = colors.red,
|
|
|
|
['!'] = colors.red,
|
|
|
|
t = colors.red
|
|
|
|
t = colors.red
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vim.api.nvim_command(
|
|
|
|
vim.api.nvim_command('hi! LualineMode guifg=' ..
|
|
|
|
'hi! LualineMode guifg=' .. mode_color[vim.fn.mode()] .. " guibg=" ..
|
|
|
|
mode_color[vim.fn.mode()] .. " guibg=" ..
|
|
|
|
colors.bg)
|
|
|
|
colors.bg)
|
|
|
|
return ''
|
|
|
|
return ''
|
|
|
|
end,
|
|
|
|
end,
|
|
|
@ -140,17 +154,30 @@ ins_left {
|
|
|
|
ins_left {
|
|
|
|
ins_left {
|
|
|
|
'filename',
|
|
|
|
'filename',
|
|
|
|
condition = conditions.buffer_not_empty,
|
|
|
|
condition = conditions.buffer_not_empty,
|
|
|
|
color = {fg = colors.magenta, gui = 'bold'}
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.magenta,
|
|
|
|
|
|
|
|
gui = 'bold'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ins_left {'location'}
|
|
|
|
ins_left {'location'}
|
|
|
|
|
|
|
|
|
|
|
|
ins_left {'progress', color = {fg = colors.fg, gui = 'bold'}}
|
|
|
|
ins_left {
|
|
|
|
|
|
|
|
'progress',
|
|
|
|
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.fg,
|
|
|
|
|
|
|
|
gui = 'bold'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ins_left {
|
|
|
|
ins_left {
|
|
|
|
'diagnostics',
|
|
|
|
'diagnostics',
|
|
|
|
sources = {'nvim_lsp'},
|
|
|
|
sources = {'nvim_diagnostic'},
|
|
|
|
symbols = {error = ' ', warn = ' ', info = ' '},
|
|
|
|
symbols = {
|
|
|
|
|
|
|
|
error = ' ',
|
|
|
|
|
|
|
|
warn = ' ',
|
|
|
|
|
|
|
|
info = ' '
|
|
|
|
|
|
|
|
},
|
|
|
|
color_error = colors.red,
|
|
|
|
color_error = colors.red,
|
|
|
|
color_warn = colors.yellow,
|
|
|
|
color_warn = colors.yellow,
|
|
|
|
color_info = colors.cyan
|
|
|
|
color_info = colors.cyan
|
|
|
@ -176,7 +203,10 @@ ins_right {
|
|
|
|
return msg
|
|
|
|
return msg
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
icon = '',
|
|
|
|
icon = '',
|
|
|
|
color = {fg = '#ffffff', gui = 'bold'}
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = '#ffffff',
|
|
|
|
|
|
|
|
gui = 'bold'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
-- Add components to right sections
|
|
|
|
-- Add components to right sections
|
|
|
@ -184,27 +214,40 @@ ins_right {
|
|
|
|
'o:encoding', -- option component same as &encoding in viml
|
|
|
|
'o:encoding', -- option component same as &encoding in viml
|
|
|
|
upper = true, -- I'm not sure why it's upper case either ;)
|
|
|
|
upper = true, -- I'm not sure why it's upper case either ;)
|
|
|
|
condition = conditions.hide_in_width,
|
|
|
|
condition = conditions.hide_in_width,
|
|
|
|
color = {fg = colors.green, gui = 'bold'}
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.green,
|
|
|
|
|
|
|
|
gui = 'bold'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ins_right {
|
|
|
|
ins_right {
|
|
|
|
'fileformat',
|
|
|
|
'fileformat',
|
|
|
|
upper = true,
|
|
|
|
upper = true,
|
|
|
|
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
|
|
|
|
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
|
|
|
|
color = {fg = colors.green, gui = 'bold'}
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.green,
|
|
|
|
|
|
|
|
gui = 'bold'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ins_right {
|
|
|
|
ins_right {
|
|
|
|
'branch',
|
|
|
|
'branch',
|
|
|
|
icon = '',
|
|
|
|
icon = '',
|
|
|
|
condition = conditions.check_git_workspace,
|
|
|
|
condition = conditions.check_git_workspace,
|
|
|
|
color = {fg = colors.violet, gui = 'bold'}
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.violet,
|
|
|
|
|
|
|
|
gui = 'bold'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ins_right {
|
|
|
|
ins_right {
|
|
|
|
'diff',
|
|
|
|
'diff',
|
|
|
|
-- Is it me or the symbol for modified us really weird
|
|
|
|
-- Is it me or the symbol for modified us really weird
|
|
|
|
symbols = {added = ' ', modified = '柳 ', removed = ' '},
|
|
|
|
symbols = {
|
|
|
|
|
|
|
|
added = ' ',
|
|
|
|
|
|
|
|
modified = '柳 ',
|
|
|
|
|
|
|
|
removed = ' '
|
|
|
|
|
|
|
|
},
|
|
|
|
color_added = colors.green,
|
|
|
|
color_added = colors.green,
|
|
|
|
color_modified = colors.orange,
|
|
|
|
color_modified = colors.orange,
|
|
|
|
color_removed = colors.red,
|
|
|
|
color_removed = colors.red,
|
|
|
@ -213,7 +256,9 @@ ins_right {
|
|
|
|
|
|
|
|
|
|
|
|
ins_right {
|
|
|
|
ins_right {
|
|
|
|
function() return '▊' end,
|
|
|
|
function() return '▊' end,
|
|
|
|
color = {fg = colors.blue},
|
|
|
|
color = {
|
|
|
|
|
|
|
|
fg = colors.blue
|
|
|
|
|
|
|
|
},
|
|
|
|
right_padding = 0
|
|
|
|
right_padding = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|