Skip to content

Commit

Permalink
feat(ui): trunc marker highlights (#781)
Browse files Browse the repository at this point in the history
closes #792
  • Loading branch information
mluna-again committed Jul 17, 2023
1 parent cd27a52 commit 77779e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
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

0 comments on commit 77779e3

Please sign in to comment.