You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm quite mind blown, this PR was one shot from a single prompt in opencode using subagents, the prompt:
┃ Can you take a look at issue #2517 in fzf-lua github repo and read the linked comment from discussion
┃ #2516 and see if you can come up with a PR to enable path_shorten using neovim extmarks?
I haven't reviewed the code yet, but my agents (3 different models) did and this is what they found:
Note it chose to use a different option as it affects the main fzf window only within neovim and can't be used in fzf-tmux so to use this you need to use winopts.path_shorten:
:FzfLuafileswinopts.path_shorten=true
Honestly, this is quite shocking, the level of understanding of a very intricate problem and solution from a two-liner prompt...
The review seems to be on-point too (which I'll soon push it's changes too).
that's interesting. it seems the shorten parts can be highlighted correctly
maybe just not work well with fd --color=always
Tested it work with term ansi hl, I see the code conceal the part not coverted by path_shorten length, so it's a better solution.
I also tested with ANSI hl and it worked, also worked with path_shorten=2 (3,etc...)
Can also use nvim_set_decoration_provider with ephemeral extmark here. It will apply on redraw, so no need to clear marks manually on redraw. return false in on_win to filter non fzf win.
I'll let the AI fix it's own work let's see what it comes up with :-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm quite mind blown, this PR was one shot from a single prompt in opencode using subagents, the prompt:
I haven't reviewed the code yet, but my agents (3 different models) did and this is what they found:

Note it chose to use a different option as it affects the main fzf window only within neovim and can't be used in fzf-tmux so to use this you need to use
winopts.path_shorten:Honestly, this is quite shocking, the level of understanding of a very intricate problem and solution from a two-liner prompt...
The review seems to be on-point too (which I'll soon push it's changes too).