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

feat: Improve look of Global Search Picker #12855

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nik-rev
Copy link
Contributor

@nik-rev nik-rev commented Feb 13, 2025

This PR:

  • Styles directory segments with ui.text.directory for consistency with the rest of the editor (as well as readability: it is easier now to tell the filename of each entry apart from its path)
  • Applies constant.numeric to the line number and : to the colon. This also has the advantage that it's easier to tell apart a filename ending with a colon / number from the actual line number

before-after-color-grep-picker

@nik-rev nik-rev changed the title feat: Improve look of Global Search Picker items feat: Improve look of Global Search Picker Feb 13, 2025
@iliekturtles
Copy link
Contributor

Consider Path::parent and Path::file_name to get the directory and filename portions of the path. That should help avoid having to iterate over all the components and re-build the directory portion of the path.

@nik-rev
Copy link
Contributor Author

nik-rev commented Feb 14, 2025

Consider Path::parent and Path::file_name to get the directory and filename portions of the path. That should help avoid having to iterate over all the components and re-build the directory portion of the path.

Thanks for the suggestion!

@DoctorRyner
Copy link

Shouldn't this be done for file picker as well? Because I think it would make sense

Co-authored-by: Poliorcetics <[email protected]>
@nik-rev
Copy link
Contributor Author

nik-rev commented Feb 16, 2025

Shouldn't this be done for file picker as well? Because I think it would make sense

Some themes use the same color to highlight search matches and the directory. It'd be confusing to have 2 colors mean the same thing.

It's a good idea, but I'd say it needs some prior discussion first and probably different PR to keep this one small

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.

6 participants