2023-02-09 16:42:53 +01:00
|
|
|
local get_config = function()
|
|
|
|
-- unload these if loaded, so that theme switching works
|
|
|
|
package.loaded["feline"] = nil
|
|
|
|
package.loaded["catppuccin.groups.integrations.feline"] = nil
|
2022-12-22 00:13:52 +01:00
|
|
|
|
2023-02-09 16:42:53 +01:00
|
|
|
local present, feline = pcall(require, "feline")
|
|
|
|
local ctp_present, ctp_feline =
|
|
|
|
pcall(require, "catppuccin.groups.integrations.feline")
|
|
|
|
|
|
|
|
if not (present and ctp_present) then
|
|
|
|
return
|
|
|
|
end
|
2022-12-22 00:13:52 +01:00
|
|
|
|
2023-01-04 13:32:59 +01:00
|
|
|
local clrs = require("catppuccin.palettes").get_palette()
|
2022-12-22 00:13:52 +01:00
|
|
|
ctp_feline.setup({
|
|
|
|
assets = {
|
|
|
|
left_separator = "",
|
|
|
|
right_separator = "",
|
|
|
|
bar = "█",
|
|
|
|
mode_icon = " ",
|
2023-02-09 16:42:53 +01:00
|
|
|
dir = " ",
|
|
|
|
file = " ",
|
2022-12-22 00:13:52 +01:00
|
|
|
git = {
|
|
|
|
branch = " ",
|
2023-02-09 16:42:53 +01:00
|
|
|
added = " ",
|
|
|
|
changed = " ",
|
|
|
|
removed = " ",
|
2022-12-22 00:13:52 +01:00
|
|
|
},
|
2023-01-04 13:32:59 +01:00
|
|
|
lsp = {
|
2023-02-09 16:42:53 +01:00
|
|
|
server = " ",
|
|
|
|
error = " ",
|
|
|
|
warning = " ",
|
|
|
|
info = " ",
|
|
|
|
hint = " ",
|
2023-01-04 13:32:59 +01:00
|
|
|
},
|
2022-12-22 00:13:52 +01:00
|
|
|
},
|
|
|
|
sett = {
|
|
|
|
show_modified = true,
|
|
|
|
curr_dir = clrs.mauve,
|
|
|
|
curr_file = clrs.blue,
|
|
|
|
bkg = clrs.crust,
|
|
|
|
},
|
|
|
|
mode_colors = {
|
|
|
|
["n"] = { "NORMAL", clrs.blue },
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2023-02-09 16:42:53 +01:00
|
|
|
feline.setup({
|
|
|
|
components = ctp_feline.get(),
|
|
|
|
force_inactive = {
|
|
|
|
filetypes = {
|
|
|
|
"^startify$",
|
|
|
|
"^fugitive$",
|
|
|
|
"^fugitiveblame$",
|
|
|
|
"^qf$",
|
|
|
|
"^help$",
|
|
|
|
},
|
|
|
|
buftypes = {
|
|
|
|
"^terminal$",
|
|
|
|
},
|
|
|
|
bufnames = {},
|
2022-12-22 00:13:52 +01:00
|
|
|
},
|
2023-02-09 16:42:53 +01:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
get_config()
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
|
|
|
pattern = "*",
|
|
|
|
callback = function()
|
|
|
|
get_config()
|
|
|
|
end,
|
2022-12-22 00:13:52 +01:00
|
|
|
})
|