Skip to content
Open
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
5 changes: 3 additions & 2 deletions doc/bufferline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ The available configuration are:
show_close_icon = true | false,
show_tab_indicators = true | false,
show_duplicate_prefix = true | false, -- whether to show duplicate buffer prefix
default_duplicate_prefix = "(duplicated) ", -- prefix added to buffers when there is no other way to differentiate them
duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
move_wraps_at_ends = false, -- whether or not the move command "wraps" at the first or last position
Expand Down Expand Up @@ -661,8 +662,8 @@ this can also be mapped to something like
nnoremap <silent> gD :BufferLinePickClose<CR>
>

You can configure the characters used for selecting buffers using the
`pick.alphabet` option. By default, both uppercase and lowercase
You can configure the characters used for selecting buffers using the
`pick.alphabet` option. By default, both uppercase and lowercase
alphanumeric characters are used.
>lua
options = {
Expand Down
1 change: 1 addition & 0 deletions lua/bufferline/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ local function get_defaults()
show_close_icon = true,
show_tab_indicators = true,
show_duplicate_prefix = true,
default_duplicate_prefix = "(duplicated) ",
duplicates_across_groups = true,
enforce_regular_tabs = false,
always_show_bufferline = true,
Expand Down
3 changes: 2 additions & 1 deletion lua/bufferline/models.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local lazy = require("bufferline.lazy")
local utils = lazy.require("bufferline.utils") ---@module "bufferline.utils"
local log = lazy.require("bufferline.utils.log") ---@module "bufferline.utils.log"
local constants = lazy.require("bufferline.constants") ---@module "bufferline.constants"
local config = lazy.require("bufferline.config") ---@module "bufferline.config"

local M = {}

Expand Down Expand Up @@ -147,7 +148,7 @@ function Tabpage:visible() return api.nvim_get_current_tabpage() == self.id end
--- @param formatter fun(string, number)
--- @return string
function Tabpage:ancestor(depth, formatter)
if self.duplicated == "element" then return "(duplicated) " end
if self.duplicated == "element" then return config.options.default_duplicate_prefix end
return self:__ancestor(depth, formatter)
end

Expand Down
1 change: 1 addition & 0 deletions lua/bufferline/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
---@field public show_close_icon? boolean
---@field public show_tab_indicators? boolean
---@field public show_duplicate_prefix? boolean
---@field public default_duplicate_prefix? string
---@field public duplicates_across_groups? boolean
---@field public enforce_regular_tabs? boolean
---@field public always_show_bufferline? boolean
Expand Down