mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(gh): force fancy diff style for gh pr diff, since that's needed to render/interact with review comments
This commit is contained in:
parent
01f6cac48f
commit
bd71cd4b00
1 changed files with 4 additions and 1 deletions
|
|
@ -141,12 +141,15 @@ function M.diff(opts, ctx)
|
|||
if opts.repo then
|
||||
vim.list_extend(args, { "--repo", opts.repo })
|
||||
end
|
||||
opts.previewers.diff.style = "fancy"
|
||||
local Render = require("snacks.gh.render")
|
||||
local Diff = require("snacks.picker.source.diff")
|
||||
---@async
|
||||
return function(cb)
|
||||
local item = Api.get({ type = "pr", repo = opts.repo, number = opts.pr })
|
||||
local annotations = Render.annotations(item)
|
||||
local annotations = ctx.async:schedule(function()
|
||||
return Render.annotations(item)
|
||||
end)
|
||||
|
||||
Diff.diff(
|
||||
ctx:opts({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue