05a642b7a9
Adds a telescope picker over 'git worktree list --porcelain'. Selecting an entry cds to that worktree and re-points every open buffer at the same relative path there, keeping cursor position and refusing to clobber unsaved work. Signed-off-by: unkin-agent <unkin-agent@unkin.net>
15 lines
302 B
Lua
15 lines
302 B
Lua
--[[ telescope/_extensions/worktree.lua ]]
|
|
|
|
local telescope = require('telescope')
|
|
|
|
return telescope.register_extension({
|
|
exports = {
|
|
worktree = function(opts)
|
|
require('func.worktree').pick(opts)
|
|
end,
|
|
list = function(opts)
|
|
require('func.worktree').pick(opts)
|
|
end,
|
|
},
|
|
})
|