SoloVim/after/plugin/git-worktree.lua
2023-09-01 01:01:16 +03:00

11 lines
271 B
Lua

if not pcall(require, "git-worktree") then
return
end
local worktree = require("git-worktree")
worktree.on_tree_change(function(op, metadata)
if op == worktree.Operations.Switch then
print("Switched from " .. metadata.prev_path .. " to " .. metadata.path)
end
end)