Skip to content
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(ui): trunc marker highlights #781

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/bufferline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,10 @@ NOTE: you can specify colors the same way you specify colors for
fg = '<colour-value-here>',
bg = '<colour-value-here>',
},
trunc_marker = {
fg = '<colour-value-here>',
bg = '<colour-value-here>',
}
};
})
<
Expand Down
7 changes: 7 additions & 0 deletions lua/bufferline/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,14 @@ local function derive_colors(preset)

local underline_sp = has_underline_indicator and tabline_sel_bg or nil

local trunc_marker_fg = comment_fg
local trunc_marker_bg = separator_background_color

return {
trunc_marker = {
fg = trunc_marker_fg,
bg = trunc_marker_bg
},
fill = {
fg = comment_fg,
bg = separator_background_color,
Expand Down
6 changes: 3 additions & 3 deletions lua/bufferline/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@ function M.tabline(items, tab_indicators)
right_element_size = right_element_size,
})

local fill = hl.fill.hl_group
local left_marker = get_trunc_marker(left_trunc_icon, fill, fill, marker.left_count)
local right_marker = get_trunc_marker(right_trunc_icon, fill, fill, marker.right_count)
local marker_hl = hl.trunc_marker.hl_group
local left_marker = get_trunc_marker(left_trunc_icon, marker_hl, marker_hl, marker.left_count)
local right_marker = get_trunc_marker(right_trunc_icon, marker_hl, marker_hl, marker.right_count)

local core = join(
utils.merge_lists(
Expand Down
Loading