python: Add label_for_symbol for ty adapter#51355
python: Add label_for_symbol for ty adapter#51355MrSubidubi merged 2 commits intozed-industries:mainfrom
label_for_symbol for ty adapter#51355Conversation
MrSubidubi
left a comment
There was a problem hiding this comment.
Thank you!
Ported label_for_symbol logic directly from the basedpyright adapter without adjustments.
That sounds somewhat reasonable, but can we not move this into a common function then that we call for both of the adapters? Otherwise we have to keep the code in sync and that does not sound too nice
|
Agreed. I've noticed a few other functions besides |
|
That sounds awesome, thank you! |
|
I've extracted While I noticed some other functions with slight variations, refactoring them would require more careful manual testing to verify the details. I'll leave those for now to keep this PR focused and safe. |
MrSubidubi
left a comment
There was a problem hiding this comment.
Nice find, nice cleanup and very nice PR. Thank you for submitting this and the quick follow-up!
Ported `label_for_symbol` logic directly from the basedpyright adapter without adjustments. Given Python's dynamic nature, the current implementation provides sufficient coverage. No further modifications are needed for now. Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Fixed missing syntax highlighting in symbol search when using the ty language server.
Ported
label_for_symbollogic directly from the basedpyright adapter without adjustments.Given Python's dynamic nature, the current implementation provides sufficient coverage. No further modifications are needed for now.
Before you mark this PR as ready for review, make sure that you have:
Release Notes: