Implementing a search improvement using Junie
Fuzzier ripgrep file type globbing
Iteration 1
GoodPrompt
Let’s make a modification to FuzzyGrep and FuzzyFinderComponent:
When FuzzyGrep is using ripgrep (rg) command, add a new field to the component. It should be located on the right side of the main search field and share the same container
When in doubt, ask me for clarifications!
Result
The actual field implementation was fine, didn’t remember to say that don’t comment every line (why is this still a thing?)Iteration 2
GoodPrompt
Remove the unnecessary comments that you’ve added and make the new field around the size of a single wordResult
Comments are gone, but when trying to limit the size, it fucked up the actual field dimensionsTODO: Image here
Decided to fix the visuals myself instead of rolling the dice.
Iteration 3 (new task)
ExcellentPrompt
Modify FuzzyFinderComponent: when when focused on either the primary or secondary text field and both are visible pressing tab should jump between themResult
Damn, it actually did it. Earlier try of the same change failed miserably.Iteration 4 (new task)
GoodPrompt
In FuzzyGrep, when the search component has text on the secondary field (this happens only when ripgrep is used) get the value of that field and if there is any, add a globbing filter to the ripgrep command so only files with that extension are processedResult
It created the command okay, minor fixes required.Iteration 5 (new task)
GoodPrompt
Use the same document listener on the second search field, so the search results are updated when it is changedResult
No problems with this task at all.Conclusion
I honestly was pretty impressed. I didn’t look at the code too closely yet, I’ll do an actual review. Till then I’ll be running this version myself.
I only ended up making some minor cleanup, though I think there was some bleeding between the classes.