Zed’s Swift tree-sitter highlights currently classify Swift labels as property, so themes cannot distinguish them from real member properties.
func printSummary(for jobs: [BuildJob]) -> Int
// ^^^ external parameter label should not be property
Current behaviour:
- External/internal function parameter names can be captured as property.
- User config cannot cleanly fix this without also changing the highlighting of real properties.
Expected:
- Parameter names should probably be variable.parameter.
- Argument labels should probably be label, variable.parameter, or another non-property capture.
- Real properties like jobs.count, job.id should remain property.
Potential fix area (need help):
(parameter external_name: (simple_identifier) @variable.parameter)
(parameter name: (simple_identifier) @variable.parameter)
(value_argument name: (value_argument_label) @label)
Zed’s Swift tree-sitter highlights currently classify Swift labels as property, so themes cannot distinguish them from real member properties.
Current behaviour:
Expected:
Potential fix area (need help):