C++: Improve parameter highlighting

This adds parameter highlighting for reference parameters and defaulted
parameters. For example:

```cpp
auto strip_prefix_only(std::string& s,
                       Hidden_Homonym skip_hidden_homonym = {}) const
    -> Affixing_Result<Prefix>;
```

Previously both parameters were only highlighted as variables.
This commit is contained in:
Michael Davis 2024-03-21 10:05:48 -04:00 committed by Blaž Hrastnik
parent c099dde2a7
commit f5d95de227

View File

@ -49,6 +49,13 @@
(this) @variable.builtin
(nullptr) @constant.builtin
; Parameters
(parameter_declaration
declarator: (reference_declarator (identifier) @variable.parameter))
(optional_parameter_declaration
declarator: (identifier) @variable.parameter)
; Keywords
(template_argument_list (["<" ">"] @punctuation.bracket))