jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
154 stars 29 forks source link

Highlight doxygen C++ tparam argument #559

Open ctxnop opened 3 years ago

ctxnop commented 3 years ago

C++ templates can be documented using the 'tparam' command. I would like the template argument name to be highlighted just like the argument name for regular arguments.

In the following exemple, "TSerialSettings" should be highlighted

/// @brief Represent a serial port.
/// @tparam TSerialSettings The settings to use with the serial port.
template <typename TSerialSettings>
class serial {};

It's almost identical to the 'param' command, except there is no direction (in, out). This means that a quick fix can be to change "param" into "t?param" everywhere it's supposed to be supported, like here: https://github.com/jeff-hykin/cpp-textmate-grammar/blob/master/syntaxes/cpp.tmLanguage.json#L1276

Obviously, this will also highlight the following syntax:

/// @brief Represent a serial port.
/// @tparam[in] TSerialSettings The settings to use with the serial port.
template <typename TSerialSettings>
class serial {};

But I don't think it's a big deal as it's not a valid syntax for doxygen.

lamm45 commented 1 year ago

Are there any updates or plans to address this open issue?