# python: Fix splat parameter highlighting \(\#58136\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7e6e731bce1fdeceed10285e45314afc8b68a092)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7e6e731bce1fdeceed10285e45314afc8b68a092

Requested commit: 7e6e731bce1fdeceed10285e45314afc8b68a092

Commit: 7e6e731bce1fdeceed10285e45314afc8b68a092

Tree: 1a9e7a68466348d808ddad48b2d10a78e368d1c4

Author: Alex Lachance

Committer: GitHub

## Message

```
python: Fix splat parameter highlighting (#58136)

In the current Python Tree-sitter `highlights.scm`, splat parameters
(e.g., `*args`, `**kwargs`) and typed splat parameters are not
highlighted as `@variable.parameter` due to missing patterns.

This PR adds `list_splat_pattern` and `dictionary_splat_pattern` to the
function parameter rules so splat parameters are correctly colored.

| Before | After |
|
:---------------------------------------------------------------------------------------------------------------------------------:
|
:--------------------------------------------------------------------------------------------------------------------------------:
|
| <img width="688" height="482" alt="image"
src="https://github.com/user-attachments/assets/dbb04e09-51a2-401a-8239-d244a01a02f9"
/> | <img width="686" height="480" alt="image"
src="https://github.com/user-attachments/assets/f07518ec-30fd-4067-b59d-e090da8182c3"
/> |


Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Fixed Python splat parameters highlighting
```

## Parents

- [94f36f54a7f198f78e8ed8e54205556d9bf3a8eb](https://git.cafe/gitcafe/zed/commit/94f36f54a7f198f78e8ed8e54205556d9bf3a8eb?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7e6e731bce1fdeceed10285e45314afc8b68a092?format=markdown)
