Skip to content

Fix label_for_symbol - #78

Merged
MrSubidubi merged 5 commits into
zed-extensions:mainfrom
roanutil:fix-label_for_symbol
Jul 20, 2026
Merged

Fix label_for_symbol#78
MrSubidubi merged 5 commits into
zed-extensions:mainfrom
roanutil:fix-label_for_symbol

Conversation

@roanutil

Copy link
Copy Markdown
Contributor

The label_for_symbol function does not handle some symbol types that SourtKit-LSP supports. Further, the CodeLabel.filter_range used is not always sensible.

I've adde a fixture swift package for easy comparison of the extension's behavior. However, I understand if that isn't something maintainers would want merged.

The most obvious visual difference after these changes is when searching for symbols while semantic_tokens is set to full for swift. The top screenshot is with these changes installed as a dev extension. The bottom screenshot is the current published version of the extension.

searching for symbols with changes searching for symbols without changes

@cla-bot

cla-bot Bot commented May 25, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @roanutil on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@roanutil

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 25, 2026
@cla-bot

cla-bot Bot commented May 25, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@MrSubidubi MrSubidubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you and sorry for the slow response!

This overall looks good, my only concern would be the fixture files - can we remove those?

@MrSubidubi MrSubidubi changed the title Fix label_for_symbol Fix label_for_symbol Jul 20, 2026
@roanutil

Copy link
Copy Markdown
Contributor Author

Thank you and sorry for the slow response!

This overall looks good, my only concern would be the fixture files - can we remove those?

Fixture removed. Thanks for making time to review this.

@roanutil
roanutil requested a review from MrSubidubi July 20, 2026 18:00

@MrSubidubi MrSubidubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for making time to review this.

Not at all, instead, thank you so much for a superb PR and improvement! And congratulations to your first contribution!

@MrSubidubi
MrSubidubi enabled auto-merge (squash) July 20, 2026 18:29
@MrSubidubi
MrSubidubi merged commit 8097e05 into zed-extensions:main Jul 20, 2026
5 checks passed
@roanutil
roanutil deleted the fix-label_for_symbol branch July 20, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants