Commit graph

1691 commits

Author SHA1 Message Date
Folke Lemaitre
dec29f5566
fix(gh): rendering of markdown comments. Closes #2488
Some checks failed
CI / ci (push) Has been cancelled
2025-11-09 21:32:18 +01:00
phanium
8ca098ca36
fix(picker.spinner): when parent win is not float win (#2487)
Some checks are pending
CI / ci (push) Waiting to run
When use checkout PR action from `gh://` buffer

```
vim.schedule callback: snacks.nvim/lua/snacks/picker/util/spinner.lua:103: attempt to perform arithmetic on field 'zindex' (a nil value)
stack traceback:
  snacks.nvim/lua/snacks/picker/util/spinner.lua:103: in function 'loading'
  snacks.nvim/lua/snacks/gh/actions.lua:796: in function '_run'
  snacks.nvim/lua/snacks/gh/actions.lua:791: in function 'fn'
  snacks.nvim/lua/snacks/picker/util/init.lua:90: in function 'on_choice'
  snacks.nvim/lua/snacks/picker/select.lua:59: in function <snacks.nvim/lua/snacks/picker/select.lua:58>
```
2025-11-09 12:34:29 +01:00
Diogo Pombeiro
c49c3f364c
perf(bigfile): disable completion to avoid lag when entering insert mode (#2475)
## Description

Default LazyVim uses the extra
[Blink.cmp](https://github.com/saghen/blink.cmp) which creates lag
(multiple seconds in a 600MB `csv` test file) when entering insert mode.
2025-11-09 10:43:56 +01:00
Folke Lemaitre
a2716102c8
fix(gh.scratch): if scratch would hide the cursor, then scroll preview up taking scrolloff into account. See #2480 2025-11-09 10:35:15 +01:00
Folke Lemaitre
8b5f76292b
fix(win): allow scrolling beyond eob 2025-11-09 10:35:14 +01:00
Folke Lemaitre
acc41322de
style: luals 2025-11-09 09:45:04 +01:00
Folke Lemaitre
021855cf29
feat(gh): added cycle win and scrolling to scratch buffers when opened in a picker. Closes #2480 2025-11-09 09:34:28 +01:00
Folke Lemaitre
197f393bbb
feat(picker.actions): allow specifying an additional window for cycle_win 2025-11-09 09:33:48 +01:00
Folke Lemaitre
6d721388cc
feat(win): opts.footer_keys can now be an array of lhs to show instead of all. See #2469 2025-11-09 09:33:24 +01:00
Folke Lemaitre
9bd41bb2ff
fix(win): use normkey instead of keytrans for footer keys 2025-11-09 09:32:25 +01:00
Folke Lemaitre
6134c98d48
feat(win): new border top_bottom 2025-11-09 09:31:46 +01:00
Folke Lemaitre
64179b96f5
fix(util.diff): proper linebreak repeat for annotation boxes
Some checks are pending
CI / ci (push) Waiting to run
2025-11-09 08:38:43 +01:00
Folke Lemaitre
06e9ca95f8
fix(gh): render gh comments as markdown when displaying in a non-markdown buffer. Closes #2481 2025-11-09 08:38:43 +01:00
Folke Lemaitre
907679381b
fix(picker.git): fix cwd for git diff. Closes #2483 2025-11-09 07:51:40 +01:00
Folke Lemaitre
6900f3feaa
fix(gh): set default scratch height=15 and fix bottom offset for custom height 2025-11-08 09:25:33 +01:00
Folke Lemaitre
9b86d57cc5
fix(markdown): use new markview API 2025-11-08 09:22:38 +01:00
Folke Lemaitre
a6a967810e
feat(gh): open scratch buffers at the bottom of the window. Closes #2476 2025-11-08 09:15:41 +01:00
Folke Lemaitre
deeb1e03e2
feat(gh): make markview.nvim play nicely with snacks. See #2467
Some checks are pending
CI / ci (push) Waiting to run
2025-11-08 08:06:28 +01:00
Folke Lemaitre
717073df1a
fix(gh): better integration with render-markdown. Closes #2467 2025-11-08 07:50:48 +01:00
Folke Lemaitre
27153d31e8
refactor(gh): shortcuts 2025-11-08 07:30:35 +01:00
Folke Lemaitre
4f749ab355
fix(picker.diff): make diff filename extmarks play nicely with markview / markdown-renderer 2025-11-08 07:27:41 +01:00
Folke Lemaitre
c6ab18964b
feat(gh): make copilot authors as bots 2025-11-08 07:19:55 +01:00
Folke Lemaitre
fe20e95780
fix(gh): diff comment action should only show when available 2025-11-08 06:51:36 +01:00
Folke Lemaitre
3024376580
fix(input): fixed completion. Closes #2472 2025-11-08 06:45:04 +01:00
Folke Lemaitre
c1e15001c0
fix(win): when a floating win becomes non-floating, remove its backdrop 2025-11-08 06:20:31 +01:00
Folke Lemaitre
685c433e61
fix(picker): fix nowait for <c-r> 2025-11-08 06:17:02 +01:00
Folke Lemaitre
ac5f497005
feat(gh): added Start Review. Closes #2463 2025-11-07 15:08:56 +01:00
Folke Lemaitre
08c0951523
feat(win): better zindex calculation 2025-11-07 15:08:56 +01:00
Folke Lemaitre
1ba0bf8a10
fix(gh.item): timestamps should be in UTC, not local time 2025-11-07 15:08:56 +01:00
Folke Lemaitre
7f62aa6c6c
fix(picker.confirm): better layout for confirm 2025-11-07 06:59:15 +01:00
Folke Lemaitre
f1c7f62f9f
feat(gh): special formatting for code suggestions in review comments. See #2463 2025-11-07 06:51:39 +01:00
Folke Lemaitre
e896fb93f6
feat(gh): when selecting lines in a diff to add a review comment, you can now suggest code changes. See #2463 2025-11-07 06:37:04 +01:00
github-actions[bot]
a4e46becca
chore(main): release 2.30.0
Some checks are pending
CI / ci (push) Waiting to run
🤖 I have created a release *beep* *boop*
---


## [2.30.0](https://github.com/folke/snacks.nvim/compare/v2.29.0...v2.30.0) (2025-11-06)


### Features

* **diff:** prettier commit rendering (git show, diff with header) ([dc2186e](dc2186e572))
* **gh:** add inline review comment annotations to diff viewer ([c83ff8d](c83ff8d598))
* **gh:** create review comments in GitHub PR diff, on diff lines. Closes [#2446](https://github.com/folke/snacks.nvim/issues/2446) ([85bf3f0](85bf3f0123))
* **layout:** allow resizing split layouts. See [#2390](https://github.com/folke/snacks.nvim/issues/2390) ([913379c](913379ccd2))
* **picker.gh_diff:** you can now reply to review comments in diffs with `a`. See [#2446](https://github.com/folke/snacks.nvim/issues/2446) ([c3bda87](c3bda8709a))
* **picker.icons:** make it easier to add custom icon sources ([82e6966](82e69661cd))
* **picker.marks:** added `<c-x>` to delete a mark from the list. See [#2390](https://github.com/folke/snacks.nvim/issues/2390) ([9a04605](9a04605664))
* **picker:** when picker was started from insert mode, return to insert after paste ([a417630](a4176301e3))
* **util.async:** add proper backtrace to unhandled async errors ([01f6cac](01f6cac48f))


### Bug Fixes

* **gh:** force `fancy` diff style for gh pr diff, since that's needed to render/interact with review comments ([bd71cd4](bd71cd4b00))
* **gh:** only skip empty comment reviews. Closes [#2445](https://github.com/folke/snacks.nvim/issues/2445) ([1848d74](1848d74e7c))
* **gh:** pass correct context in gh_perform_action. Closes [#2442](https://github.com/folke/snacks.nvim/issues/2442). Closes [#2443](https://github.com/folke/snacks.nvim/issues/2443) ([13edbc6](13edbc681c))
* **gh:** properly handly pending requests ([7a15e16](7a15e16d01))
* **gh:** use lua to parse dates so we can do this in a fast context ([cd0d6fe](cd0d6fe864))
* **image:** run terminal capability detection synchronous when needed. Closes [#2439](https://github.com/folke/snacks.nvim/issues/2439) ([58f1152](58f11527fe))
* **layout:** ignore very zindex windows for calulating layout zindex, so that it stays below things like notifications ([47340e6](47340e6b0b))
* **lsp:** properly detach buffers on LspDetach. Closes [#2457](https://github.com/folke/snacks.nvim/issues/2457) ([beb995e](beb995e1c6))
* **picker.actions:** don't open a new tab if the current tab is empty. Closes [#2461](https://github.com/folke/snacks.nvim/issues/2461) ([4e2424e](4e2424eca7))
* **picker.diff:** added `showbreak=""` for fancy diff. Closes [#2441](https://github.com/folke/snacks.nvim/issues/2441) ([fb55f7b](fb55f7bf2b))
* **picker.format:** use file for icon. fallback to ft when buffer is not a file. See [#2390](https://github.com/folke/snacks.nvim/issues/2390) ([20ac8bf](20ac8bfc4a))
* **picker.grep_word:** pass `--word-regexp` to `ripgrep` ([6aad368](6aad36810a))
* **picker.highlight:** resolve ([4438ee4](4438ee4770))
* **picker.input:** startinsert when starting the picker from terminal mode. See [#2390](https://github.com/folke/snacks.nvim/issues/2390) ([b2054a3](b2054a3a73))
* **picker.lsp_config:** nil on lsp info ([#2459](https://github.com/folke/snacks.nvim/issues/2459)) ([c5257fa](c5257fa690))
* **scope:** textobjects should use synchronous treesitter parsing. Closes [#2448](https://github.com/folke/snacks.nvim/issues/2448) ([9737c25](9737c25f29))
* **toggle:** set/get raw values for option toggles. See [#2390](https://github.com/folke/snacks.nvim/issues/2390) ([41da728](41da728f02))
* **win:** set `foldcolumn='0'` for minimal style. See [#2390](https://github.com/folke/snacks.nvim/issues/2390) ([195faa0](195faa0646))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
2025-11-06 22:23:04 +01:00
Folke Lemaitre
4e2424eca7
fix(picker.actions): don't open a new tab if the current tab is empty. Closes #2461 2025-11-06 22:21:06 +01:00
Folke Lemaitre
85bf3f0123
feat(gh): create review comments in GitHub PR diff, on diff lines. Closes #2446 2025-11-06 22:04:47 +01:00
Folke Lemaitre
c3bda8709a
feat(picker.gh_diff): you can now reply to review comments in diffs with a. See #2446 2025-11-06 18:35:57 +01:00
Folke Lemaitre
47340e6b0b
fix(layout): ignore very zindex windows for calulating layout zindex, so that it stays below things like notifications 2025-11-06 18:25:04 +01:00
Folke Lemaitre
6e16c85212
refactor(picker): generalize line meta data in vim.b.snacks_meta 2025-11-06 18:01:37 +01:00
Folke Lemaitre
7a94861471
style(gh): cleanup 2025-11-06 17:56:29 +01:00
Folke Lemaitre
bd71cd4b00
fix(gh): force fancy diff style for gh pr diff, since that's needed to render/interact with review comments 2025-11-06 17:15:54 +01:00
Folke Lemaitre
01f6cac48f
feat(util.async): add proper backtrace to unhandled async errors 2025-11-06 17:15:20 +01:00
Folke Lemaitre
7a15e16d01
fix(gh): properly handly pending requests 2025-11-06 16:57:21 +01:00
Folke Lemaitre
cd0d6fe864
fix(gh): use lua to parse dates so we can do this in a fast context 2025-11-06 16:16:03 +01:00
Folke Lemaitre
4438ee4770
fix(picker.highlight): resolve
Some checks are pending
CI / ci (push) Waiting to run
2025-11-06 12:55:54 +01:00
EasonMo
c5257fa690
fix(picker.lsp_config): nil on lsp info (#2459)
## Description

It will report message `error: vim/shared.lua:0: t: expected table, got
nil` when execute `Snacks.picker.lsp_config()`.
2025-11-06 12:18:08 +01:00
Folke Lemaitre
c83ff8d598
feat(gh): add inline review comment annotations to diff viewer
Refactors the diff renderer to support displaying GitHub review comments
inline with the relevant diff lines. Links review comments to specific
file positions using reviewThreads data from the GraphQL API, enabling a
more intuitive code review experience directly within the diff view.

- Refactored gh/api.lua to async fetch review comments and threads
- Added annotation support to diff renderer with context object pattern
- Separated diff parsing from formatting for better maintainability
- Integrated review comment positioning via reviewThreads linkage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 12:00:29 +01:00
Folke Lemaitre
beb995e1c6
fix(lsp): properly detach buffers on LspDetach. Closes #2457
Some checks are pending
CI / ci (push) Waiting to run
2025-11-06 07:02:56 +01:00
Folke Lemaitre
58f11527fe
fix(image): run terminal capability detection synchronous when needed. Closes #2439 2025-11-06 06:50:21 +01:00
Folke Lemaitre
93cd1175e6
refactor(gh): render cleanup 2025-11-06 06:50:21 +01:00
Folke Lemaitre
f2b3244ed6
refactor(picker): horizontal rules 2025-11-06 06:50:21 +01:00