Skip to content

Add completion menu for file paths #145

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Adictya
Copy link

@Adictya Adictya commented May 2, 2025

Addresses #66
Demo:
pr-demo

I have added the autocomplete functionality. But had a couple of questions I would like the maintainers opinions on:

  1. I found myself copying a lot of code from the commands dialog or the new themes dialog for the list, does it make sense to have a simple list component for all of these usecases? I can work on it as part of this pr.

  2. I really would love fuzzy search to be in as well, Does it make more sense to have a package that does it or rely on system having "fzf" and passing the query to that instead.

Will proceed with finalizing the code once I can get more clarity, just a couple of hours work left. It was a great experience working first time in Go.

@Adictya
Copy link
Author

Adictya commented May 2, 2025

@kujtimiihoxha Not sure who to tag, hope this is fair to ask your opinion on this

@Adictya Adictya changed the title Add completion menu for file paths WIP Add completion menu for file paths May 2, 2025
@Adictya Adictya force-pushed the feat-autocomplete-for-file-paths branch from 251f602 to 56c0c7f Compare May 2, 2025 19:42
@kujtimiihoxha
Copy link
Collaborator

@Adictya first of all this is such an awesome PR 🤩 , especially for the first time writing go 🙌

I found myself copying a lot of code from the commands dialog or the new themes dialog for the list, does it make sense to have a simple list component for all of these usecases? I can work on it as part of this pr.

I would say if you can find a way to simplify it and add a common component I am all for it.

I really would love fuzzy search to be in as well, Does it make more sense to have a package that does it or rely on system having "fzf" and passing the query to that instead.

I think a combination of this would be the best, check if the user has fzf installed and use it or if not fallback to a library.

This is looking really really great...

@Adictya
Copy link
Author

Adictya commented May 3, 2025

Haha, thanks man! Ill get on it.

}

commonIgnoredDirs := map[string]bool{
".opencode": true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added opencode to common ignored dirs

@Adictya Adictya marked this pull request as ready for review May 11, 2025 11:11
@Adictya
Copy link
Author

Adictya commented May 11, 2025

@kujtimiihoxha Ready for review! Let me know if this looks good, I can go ahead with the tests after your review

@Adictya Adictya changed the title WIP Add completion menu for file paths Add completion menu for file paths May 11, 2025
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.

2 participants