Fly through your tabs in neovim
You can show the picker from neovim's cmd-line by executing
:Telescope telescope-tabs list_tabs
Or straight from the plugin's path with lua
:lua require('telescope-tabs').list_tabs()
You can press C-d
on any Item in the picker to close the tab (respectively all windows in it). To change the keybinding, look at configure.
Install with your favorite Neovim package manager.
Example with packer.nvim:
use {
'LukasPietzschmann/telescope-tabs',
requires = { 'nvim-telescope/telescope.nvim' },
config = function()
require'telescope-tabs'.setup{
-- Your custom config :^)
}
end
}
Options can be set by calling the setup function. The following things can be changed:
This changes how a tab is represented in the picker. By default the following function is used:
entry_formatter = function(tab_id, buffer_ids, file_names, file_paths)
local entry_string = table.concat(file_names, ', ')
return string.format('%d: %s', tab_id, entry_string)
end,
To alter this behaviour, just assign your own function.
This controls whether a preview is shown or not. The default is true
:
show_preview = true,
This shortcut allows you to close a selected tabs right from the picker. The default is...
close_tab_shortcut = 'C-d',
Note, that this value does not get parsed or checked, so it should follow the regular format for keybindings.