vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Option to disable hover for just this plugin

Open tbfleming opened this issue 2 years ago • 5 comments

Feature Request

When hover is enabled globally via editor.hover.enabled, vscode often freezes on C++ code. I have to disable it, but I really want hover enabled for other plugins, e.g. GitLens. I don't find the C++ plugin's hovers useful, and they tend to get in the way, so I'd prefer to disable them even if they weren't freezing vscode.

tbfleming avatar Aug 26 '22 14:08 tbfleming

e.g. of why I don't like the C++ hovers:

image

I don't need it to pester me with definitions except when I explicitly ask for one

tbfleming avatar Aug 26 '22 15:08 tbfleming

Is using

    "[cpp]": {
        "editor.hover.enabled": false
    }

sufficient?

sean-mcmanus avatar Aug 26 '22 19:08 sean-mcmanus

Also, the bad/incorrect hover result is caused by usage of C_Cpp.intelliSenseEngine "Tag Parser" or a configuration error that is causing it to fall back to the "Tag Parser" hover (or a crash or delay in the initial IntelliSense parsing). If the IntelliSense is working correctly the hover should return a single result. However, it's possible it may still trigger delays due to code that attempts to retrieve documentation comments.

sean-mcmanus avatar Aug 26 '22 19:08 sean-mcmanus

Is using

    "[cpp]": {
        "editor.hover.enabled": false
    }

sufficient?

Unfortunately that disables all plugins' hovers in cpp files, not just the C/C++ extension.

tbfleming avatar Aug 26 '22 19:08 tbfleming

Setting "C_Cpp.intelliSenseEngine" to "Disabled" will work, but it would disable "all" language service features.

The implementation of a new "C_Cpp.hover" setting might follow the example of the existing "C_Cpp.autocomplete" setting.

sean-mcmanus avatar Aug 26 '22 19:08 sean-mcmanus

The fix is available with 1.13.3 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.3

sean-mcmanus avatar Oct 26 '22 22:10 sean-mcmanus

Thanks!

tbfleming avatar Oct 26 '22 22:10 tbfleming