feat(builtin.buffers): enhance and bind delete_buffer action (#3145)
* feat(builtin.buffers): enhance and bind `delete_buffer` action * change default bind and add docs * [docgen] Update doc/telescope.txt skip-checks: true --------- Co-authored-by: Github Actions <actions@github>
This commit is contained in:
@@ -972,6 +972,9 @@ internal.buffers = function(opts)
|
||||
previewer = conf.grep_previewer(opts),
|
||||
sorter = conf.generic_sorter(opts),
|
||||
default_selection_index = default_selection_idx,
|
||||
attach_mappings = function(_, map)
|
||||
map({ "i", "n" }, "<M-d>", actions.delete_buffer)
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
@@ -339,6 +339,8 @@ builtin.man_pages = require_on_exported_call("telescope.builtin.__internal").man
|
||||
builtin.reloader = require_on_exported_call("telescope.builtin.__internal").reloader
|
||||
|
||||
--- Lists open buffers in current neovim instance, opens selected buffer on `<cr>`
|
||||
--- - Default keymaps:
|
||||
--- - `<M-d>`: delete the currently selected buffer
|
||||
---@param opts table: options to pass to the picker
|
||||
---@field cwd string: specify a working directory to filter buffers list by
|
||||
---@field show_all_buffers boolean: if true, show all buffers, including unloaded buffers (default: true)
|
||||
|
||||
Reference in New Issue
Block a user