267 lines
4.3 KiB
Lua
267 lines
4.3 KiB
Lua
local M = {
|
|
'feline-nvim/feline.nvim',
|
|
-- lazy = false
|
|
event = 'UIEnter',
|
|
-- dependencies = {
|
|
-- 'nvim-tree/nvim-web-devicons',
|
|
-- },
|
|
}
|
|
|
|
function M.config()
|
|
local feline = require 'feline'
|
|
|
|
local theme = {
|
|
fg = '#abb2bf',
|
|
bg = '#282828',
|
|
green = '#98c379',
|
|
yellow = '#e5c07b',
|
|
purple = '#c678dd',
|
|
orange = '#d19a66',
|
|
peanut = '#f6d5a4',
|
|
red = '#e06c75',
|
|
aqua = '#61afef',
|
|
bg2 = '#504945',
|
|
dark_red = '#f75f5f',
|
|
}
|
|
|
|
local vi_mode_colors = {
|
|
NORMAL = 'green',
|
|
OP = 'green',
|
|
INSERT = 'yellow',
|
|
VISUAL = 'purple',
|
|
LINES = 'orange',
|
|
BLOCK = 'dark_red',
|
|
REPLACE = 'red',
|
|
COMMAND = 'aqua',
|
|
}
|
|
|
|
local c = {
|
|
vim_mode = {
|
|
provider = {
|
|
name = 'vi_mode',
|
|
opts = {
|
|
show_mode_name = true,
|
|
-- padding = "center", -- Uncomment for extra padding.
|
|
},
|
|
},
|
|
hl = function()
|
|
return {
|
|
fg = require('feline.providers.vi_mode').get_mode_color(),
|
|
bg = 'bg2',
|
|
style = 'bold',
|
|
name = 'NeovimModeHLColor',
|
|
}
|
|
end,
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
gitBranch = {
|
|
provider = 'git_branch',
|
|
hl = {
|
|
fg = 'peanut',
|
|
bg = 'bg2',
|
|
style = 'bold',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
gitDiffAdded = {
|
|
provider = 'git_diff_added',
|
|
hl = {
|
|
fg = 'green',
|
|
bg = 'bg2',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
gitDiffRemoved = {
|
|
provider = 'git_diff_removed',
|
|
hl = {
|
|
fg = 'red',
|
|
bg = 'bg2',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
gitDiffChanged = {
|
|
provider = 'git_diff_changed',
|
|
hl = {
|
|
fg = 'fg',
|
|
bg = 'bg2',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'right_filled',
|
|
},
|
|
separator = {
|
|
provider = '',
|
|
},
|
|
file_info = {
|
|
provider = {
|
|
name = 'file_info',
|
|
opts = {
|
|
colored_icon = false,
|
|
type = 'relative-short',
|
|
},
|
|
},
|
|
hl = {
|
|
style = 'bold',
|
|
},
|
|
left_sep = ' ',
|
|
right_sep = ' ',
|
|
},
|
|
diagnostic_errors = {
|
|
provider = 'diagnostic_errors',
|
|
hl = {
|
|
fg = 'red',
|
|
},
|
|
},
|
|
diagnostic_warnings = {
|
|
provider = 'diagnostic_warnings',
|
|
hl = {
|
|
fg = 'yellow',
|
|
},
|
|
},
|
|
diagnostic_hints = {
|
|
provider = 'diagnostic_hints',
|
|
hl = {
|
|
fg = 'aqua',
|
|
},
|
|
},
|
|
diagnostic_info = {
|
|
provider = 'diagnostic_info',
|
|
},
|
|
lsp_client_names = {
|
|
provider = 'lsp_client_names',
|
|
hl = {
|
|
fg = 'purple',
|
|
bg = 'bg2',
|
|
style = 'bold',
|
|
},
|
|
left_sep = 'left_filled',
|
|
right_sep = 'right_filled',
|
|
},
|
|
file_type = {
|
|
provider = {
|
|
name = 'file_type',
|
|
opts = {
|
|
-- filetype_icon = true,
|
|
colored_icon = false,
|
|
case = 'titlecase',
|
|
},
|
|
},
|
|
hl = {
|
|
fg = 'red',
|
|
bg = 'bg2',
|
|
style = 'bold',
|
|
},
|
|
left_sep = 'left_filled',
|
|
right_sep = 'block',
|
|
},
|
|
file_encoding = {
|
|
provider = 'file_encoding',
|
|
hl = {
|
|
fg = 'orange',
|
|
bg = 'bg2',
|
|
-- style = 'italic',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
position = {
|
|
provider = 'position',
|
|
hl = {
|
|
fg = 'green',
|
|
bg = 'bg2',
|
|
style = 'bold',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
line_percentage = {
|
|
provider = 'line_percentage',
|
|
hl = {
|
|
fg = 'aqua',
|
|
bg = 'bg2',
|
|
style = 'bold',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
scroll_bar = {
|
|
provider = 'scroll_bar',
|
|
hl = {
|
|
fg = 'yellow',
|
|
style = 'bold',
|
|
},
|
|
},
|
|
search_count = {
|
|
provider = 'search_count',
|
|
hl = {
|
|
style = 'bold',
|
|
bg = 'bg2',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
macro = {
|
|
provider = 'macro',
|
|
hl = {
|
|
style = 'bold',
|
|
bg = 'bg2',
|
|
},
|
|
left_sep = 'block',
|
|
right_sep = 'block',
|
|
},
|
|
}
|
|
|
|
local left = {
|
|
c.vim_mode,
|
|
c.file_info,
|
|
-- c.gitBranch,
|
|
-- c.gitDiffAdded,
|
|
-- c.gitDiffRemoved,
|
|
-- c.gitDiffChanged,
|
|
-- c.separator,
|
|
c.diagnostic_errors,
|
|
c.diagnostic_warnings,
|
|
c.diagnostic_info,
|
|
c.diagnostic_hints,
|
|
}
|
|
|
|
local middle = {
|
|
c.lsp_client_names,
|
|
c.separator,
|
|
}
|
|
|
|
local right = {
|
|
c.file_type,
|
|
c.search_count,
|
|
c.macro,
|
|
c.file_encoding,
|
|
c.position,
|
|
c.line_percentage,
|
|
c.scroll_bar,
|
|
}
|
|
|
|
local components = {
|
|
active = {
|
|
left,
|
|
middle,
|
|
right,
|
|
},
|
|
inactive = {
|
|
left,
|
|
middle,
|
|
right,
|
|
},
|
|
}
|
|
|
|
feline.setup {
|
|
components = components,
|
|
theme = theme,
|
|
vi_mode_colors = vi_mode_colors,
|
|
}
|
|
end
|
|
|
|
return M
|