microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.46k stars 1.53k forks source link

Add semantic token modifier for constant variables #12061

Open jmigual opened 6 months ago

jmigual commented 6 months ago

Feature Request

When using the clangd extension, it provides the readonly rule/token modifier (sorry I don't know the exact terminology) that can be used to highlight constant variables: image

However, when using intellisense as the parser this does not happen as it only provides the local modifier: image

(for colorblind people, the variable constVar has a dark blue color in the first image and has the same color as nonConst in the second one)

sean-mcmanus commented 6 months ago

This is being tracked on VS with https://developercommunity.visualstudio.com/t/Add-C-Local-Constants-to-Options--E/10335703