![]() This PR addresses the highlighting of function parameters in Python.
#21454 added various improvements to Python highlighting. However, some
of the capture groups are missing corresponding colors in themes, which
was also [noted on the
PR](https://github.com/zed-industries/zed/pull/21454#pullrequestreview-2537510964).
Currently, this is especially bad for function parameters, which are not
only missing corresponding colors, but are also captured incorrectly as
`arguments` instead of `parameters`. Additionally, as not one theme
defines `function.arguments` (I cheked this with the [extension
surveyor](https://github.com/zed-industries/extension-surveyor), we
instead always fall back to `function` here. Thus, parameters are always
highlighted the same as functions, resulting in incorrect and inproper
highlighting.
This PR resolves this issue by instead capturing parameters as
`variable.parameter`, which has not perfect, but much better coverage
among existing themes.
| `main` | <img width="670" alt="main"
src="https://github.com/user-attachments/assets/6942b494-fe0f-4537-8503-8de4e2c5a30e"
/> |
| --- | --- |
| This PR | <img width="670" alt="PR"
src="https://github.com/user-attachments/assets/f0d1d22a-c5f4-46b8-a22b-f18e0e55fa47"
/> |
---
Following [this
comment](
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-GPL |