Skip to content
Lukas Pietzschmann edited this page Apr 27, 2023 · 3 revisions

Configs

This is a (hopefully growing) list of different configs submitted by other users, or thought of by me :)


This config will list full paths to the files relative to the current working directory. For files outside the cwd the full path is shown. Thanks to @hinell (#12)

require("telescope-tabs").setup({
	entry_formatter = function(tab_id, buffer_ids, file_names, file_paths, is_current)
		local entry_string = table.concat(vim.tbl_map(function(v)
			return vim.fn.fnamemodify(v, ":.")
		end, file_paths), ', ')
		return string.format('%d: %s%s', tab_id, entry_string, is_current and ' <' or '')
	end
})

If you're using tabby.nvim, this config might come in handy. With it installed, telescope-tabs will display the same name that tabby does. Thanks to @IceS2 (#14)

require("telescope-tabs").setup {
    entry_formatter = function(tab_id, buffer_ids, file_names, file_paths, is_current)
        local tab_name = require("tabby.feature.tab_name").get(tab_id)
        return string.format("%d: %s%s", tab_id, tab_name, is_current and " <" or "")
    end,
    entry_ordinal = function(tab_id, buffer_ids, file_names, file_paths, is_current)
       return require("tabby.feature.tab_name").get(tab_id)
    end
}
Clone this wiki locally