Comment by andelink
3 days ago
Seems like a minor thing to change IDEs over. Would a Zed task that runs the relevant git command work for you? e.g.
// ${XDG_CONFIG_HOME}/zed/tasks.json
[
{
"command": "git --paginate log --follow -p -m -1 ${ZED_FILE}",
"label": "last-file-diff:${ZED_FILE}",
"shell": { "program": "sh" }
}
]
You can even throw a keybind on it if you'd like:
// ${XDG_CONFIG_HOME}/zed/keymap.json
[
{
"context": "Editor && mode == full",
"bindings": {
"ctrl-shift-g d": [
"task::Spawn",
{ "task_name": "last-file-diff:${ZED_FILE}" }
]
}
}
]
I am not familiar with gitlens so not sure how close this gets you but you should be able to replicate the functionality you need from the git CLI and some light scripting. This can be a jumping off point maybe. If you want to view the diff using the zed diff viewer, you can do so using `zed --diff`, as demonstrated in this GitHub discussion: https://github.com/zed-industries/zed/discussions/33503#disc...
No comments yet
Contribute on Hacker News ↗