Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit fzf to ignore lib #4967

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open

Edit fzf to ignore lib #4967

wants to merge 2 commits into from

Conversation

ChrisPenner
Copy link
Contributor

Overview

Opening this as an experiment to try out;

I noticed when using fzf with edit that it includes stuff from lib, which was making it harder to find what I wanted to edit. I realized I never want to edit things from in lib, so this build removes lib from commands like edit and delete, but leaves it on for things like view where you're more likely to be delving into lib defns.

You can still explicitly type out an edit for any defn you like.

Implementation notes

Adds a param to argument resolvers for whether to include lib in the FZF.

Test coverage

Updated the fzf transcripts

@ceedubs
Copy link
Contributor

ceedubs commented May 17, 2024

I'll confess that I occasionally (ab)use edit to load a lib definition into my scratch file intentionally. Sometimes it's because large definitions are easier to inspect in my editor than in less. And sometimes it's because I want to copy parts of it or write a new version that I plan to later submit upstream.

@aryairani
Copy link
Contributor

Based on the conflicting comments above, I'm not sure whether to merge this or not. Are folks wanting to try it out first?

@ChrisPenner
Copy link
Contributor Author

It's an experiment, we can try some other things too; like maybe adjusting the fzf integration to deprioritize lib results to the bottom of the list.

@ceedubs
Copy link
Contributor

ceedubs commented May 20, 2024

adjusting the fzf integration to deprioritize lib results to the bottom of the list

At face value that sounds nice. But I guess that I don't know how it is in practice. Like if I search for List.map does myapp.fibonacci show up before lib.base.dataList.map because it has a couple of the same characters and isn't in lib? 😅

It's also possible that removing lib from edit results is just fine. I don't commit the aforementioned sin often.

@aryairani
Copy link
Contributor

I managed to update it to trunk once before a merge conflict appeared. :) :(

@aryairani
Copy link
Contributor

Well, we can always just merge it to try it; or we could get something set up to make it easier to toggle this sort of setting from inside or outside of ucm. i.e. add a set/settings command to ucm

@mergify mergify bot mentioned this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants