Skip to content

Narrow tag of function declaration captures#21

Merged
MrSubidubi merged 1 commit intozed-extensions:mainfrom
lvignoli:louisvig/push-slvxmovxmrnl
Feb 2, 2026
Merged

Narrow tag of function declaration captures#21
MrSubidubi merged 1 commit intozed-extensions:mainfrom
lvignoli:louisvig/push-slvxmovxmrnl

Conversation

@lvignoli
Copy link
Copy Markdown
Contributor

@lvignoli lvignoli commented Jan 2, 2026

Following builtin python, we tag function declaration captures with @function.definition instead of @function. See https://github.com/zed-industries/zed/blob/e1a09e290c48fc02d07aaf2150856d77996414df/crates/languages/src/python/highlights.scm#L52.

This fixes highlighting for themes making the distinction between declarations and calls. One such theme is Alabaster, see https://github.com/tsimoshka/zed-theme-alabaster/blob/124750e2cab8a7fbfdaf26c7ccfc5fa0ba1d0541/themes/alabaster-color-theme.json#L242.

Following builtin python, we tag function declaration captures with
`@function.definition` instead of `@function`. See
https://github.com/zed-industries/zed/blob/e1a09e290c48fc02d07aaf2150856d77996414df/crates/languages/src/python/highlights.scm#L52.

This fixes highlighting for themes making the distinction between
declarations and calls. One such theme is Alabaster, see
https://github.com/tsimoshka/zed-theme-alabaster/blob/124750e2cab8a7fbfdaf26c7ccfc5fa0ba1d0541/themes/alabaster-color-theme.json#L242.
@cla-bot cla-bot bot added the cla-signed label Jan 2, 2026
Copy link
Copy Markdown
Contributor

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

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

Good catch and nice context, thanks for providing it!

@MrSubidubi MrSubidubi merged commit 32667bc into zed-extensions:main Feb 2, 2026
7 checks passed
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