-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(highlights): add fzf-lua #79
base: main
Are you sure you want to change the base?
Changes from 14 commits
f043dc5
7beb13f
75ece50
8f9bd00
b8a3a49
ed7cd13
24c7def
1a0ff47
9bebdbf
f2e0b30
7852e33
7dcd3cc
82af4f0
a555a3d
2e8617a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
local M = {} | ||
|
||
function M.set(hl, colors) | ||
hl.set("FzfLuaNormal", { bg = colors.dark_bg, fg = colors.fg3 }) | ||
hl.set("FzfLuaBorder", { bg = colors.dark_bg, fg = colors.dark_bg }) | ||
hl.set("FzfLuaTitle", { fg = hl.get("Normal").fg }) | ||
hl.set("FzfLuaPreviewNormal", { bg = hl.get("Normal").bg, fg = hl.get("Normal").fg }) | ||
hl.set("FzfLuaPreviewBorder", { bg = hl.get("Normal").bg, fg = hl.get("Normal").bg }) | ||
hl.set("FzfLuaPreviewTitle", { link = "FzfLuaTitle" }) | ||
hl.set("FzfLuaCursorLine", { bg = colors.bg2, fg = colors.fg2 }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I would suggest: ( local groups = require("mellifluous.highlights.custom_groups").get(colors)
hl.set("FzfLuaCursorLine", { bg = groups.MenuButtonSelected(normal.bg).bg, fg = normal.fg }) I don't think there's any reason to have lighter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, apparently, |
||
hl.set("FzfLuaScrollBorderFull", { fg = colors.bg4 }) | ||
hl.set("FzfLuaScrollBorderEmpty", { fg = colors.bg }) | ||
hl.set("FzfLuaScrollFloatFull", { link = "FzfLuaScrollBorderFull" }) | ||
hl.set("FzfLuaScrollFloatEmpty", { link = "FzfLuaScrollBorderEmpty" }) | ||
hl.set("FzfLuaHeaderBind", { fg = colors.ui_purple }) | ||
hl.set("FzfLuaHeaderText", { fg = colors.fg4 }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This group goes nicely here: hl.set("FzfLuaFzfHeader", { fg = colors.fg4 }) |
||
hl.set("FzfLuaPathLineNr", { fg = colors.fg4 }) | ||
hl.set("FzfLuaPathColNr", { fg = colors.fg4 }) | ||
hl.set("FzfLuaBufName", { fg = colors.ui_orange }) | ||
hl.set("FzfLuaBufNr", { fg = colors.fg4 }) | ||
hl.set("FzfLuaBufFlagCur", { fg = colors.ui_purple }) | ||
hl.set("FzfLuaBufFlagAlt", { fg = colors.ui_green }) | ||
hl.set("FzfLuaTabTitle", { link = "FzfLuaTitle" }) | ||
hl.set("FzfLuaTabMarker", { fg = colors.ui_purple }) | ||
hl.set("FzfLuaLiveSym", { fg = colors.fg }) | ||
hl.set("FzfLuaFzfMatch", { fg = colors.fg }) | ||
hl.set("FzfLuaFzfScrollbar", { fg = colors.fg4 }) | ||
hl.set("FzfLuaFzfSeparator", { fg = colors.dark_bg }) | ||
hl.set("FzfLuaFzfGutter", { bg = colors.dark_bg }) | ||
hl.set("FzfLuaFzfPointer", { fg = colors.fg4 }) | ||
hl.set("FzfLuaFzfMarker", { fg = colors.ui_orange }) | ||
hl.set("FzfLuaFzfPrompt", { fg = colors.fg4 }) | ||
hl.set("FzfLuaFzfQuery", { fg = colors.fg }) | ||
end | ||
|
||
return M |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there is no easy way to change normal
bg
or previewbg
without changing a whole lot of highlight groups manually.I think it's okay to use some variables for highlights as long as it offers readability and/or maintainability improvements. Here we could have a variable
normal
forFzfLuaNormal
, this variable could then be reused in other highlight groups. Similarly we could have a variablepreview_normal
.A fine alternative would be to reuse
FzfLuaNormal
andFzfLuaPreviewNormal
with linking andhl.get
function.