nvim/lua/plugins/feline.lua

267 lines
4.3 KiB
Lua
Raw Normal View History

2022-12-31 17:43:31 +01:00
local M = {
'feline-nvim/feline.nvim',
-- lazy = false
event = 'UIEnter',
2023-01-01 19:36:00 +01:00
-- dependencies = {
-- 'nvim-tree/nvim-web-devicons',
-- },
2022-12-31 17:43:31 +01:00
}
function M.config()
local feline = require 'feline'
local theme = {
2023-01-23 21:51:04 +01:00
fg = '#7c879c',
bg = '#efe2c3',
green = '#66cc66',
yellow = '#d5992a',
2022-12-31 17:43:31 +01:00
purple = '#c678dd',
2023-01-23 21:51:04 +01:00
orange = '#b17135',
2022-12-31 17:43:31 +01:00
peanut = '#f6d5a4',
red = '#e06c75',
aqua = '#61afef',
2023-01-23 21:51:04 +01:00
bg2 = '#dfce9f',
2022-12-31 17:43:31 +01:00
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(),
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
style = 'bold',
name = 'NeovimModeHLColor',
}
end,
left_sep = 'block',
right_sep = 'block',
},
gitBranch = {
provider = 'git_branch',
hl = {
fg = 'peanut',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
style = 'bold',
},
left_sep = 'block',
right_sep = 'block',
},
gitDiffAdded = {
provider = 'git_diff_added',
hl = {
fg = 'green',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
},
left_sep = 'block',
right_sep = 'block',
},
gitDiffRemoved = {
provider = 'git_diff_removed',
hl = {
fg = 'red',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
},
left_sep = 'block',
right_sep = 'block',
},
gitDiffChanged = {
provider = 'git_diff_changed',
hl = {
fg = 'fg',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
},
left_sep = 'block',
right_sep = 'right_filled',
},
separator = {
provider = '',
},
2023-01-01 19:36:00 +01:00
file_info = {
2022-12-31 17:43:31 +01:00
provider = {
name = 'file_info',
opts = {
2023-01-01 19:36:00 +01:00
colored_icon = false,
2022-12-31 17:43:31 +01:00
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',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
style = 'bold',
},
left_sep = 'left_filled',
right_sep = 'right_filled',
},
file_type = {
provider = {
name = 'file_type',
opts = {
2023-01-01 19:36:00 +01:00
-- filetype_icon = true,
colored_icon = false,
2022-12-31 17:43:31 +01:00
case = 'titlecase',
},
},
hl = {
fg = 'red',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
style = 'bold',
},
left_sep = 'left_filled',
right_sep = 'block',
},
file_encoding = {
provider = 'file_encoding',
hl = {
fg = 'orange',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
-- style = 'italic',
},
left_sep = 'block',
right_sep = 'block',
},
position = {
provider = 'position',
hl = {
fg = 'green',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
style = 'bold',
},
left_sep = 'block',
right_sep = 'block',
},
line_percentage = {
provider = 'line_percentage',
hl = {
fg = 'aqua',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2022-12-31 17:43:31 +01:00
style = 'bold',
},
left_sep = 'block',
right_sep = 'block',
},
scroll_bar = {
provider = 'scroll_bar',
hl = {
fg = 'yellow',
style = 'bold',
},
},
2023-01-03 14:56:39 +01:00
search_count = {
provider = 'search_count',
hl = {
style = 'bold',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2023-01-03 14:56:39 +01:00
},
left_sep = 'block',
right_sep = 'block',
},
macro = {
provider = 'macro',
hl = {
style = 'bold',
2023-01-13 22:22:33 +01:00
bg = 'bg2',
2023-01-03 14:56:39 +01:00
},
left_sep = 'block',
right_sep = 'block',
},
2022-12-31 17:43:31 +01:00
}
local left = {
c.vim_mode,
2023-01-01 19:36:00 +01:00
c.file_info,
2022-12-31 17:43:31 +01:00
-- 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,
2023-01-03 14:56:39 +01:00
c.search_count,
c.macro,
2022-12-31 17:43:31 +01:00
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