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

Turn off features?

Open dsanders11 opened this issue 4 years ago • 7 comments

Is it possible to turn off features from the extension? For example, if I only want clang-tidy there's a lot of extra functionality included that it's not clear how to turn off.

dsanders11 avatar Oct 23 '20 23:10 dsanders11

I would also like to have the option to choose which features to use. In my case, I would like to use only the clang-tidy on-the-fly checks.

philippewarren avatar Mar 06 '24 19:03 philippewarren

If you're only looking for clang-tidy diagnostics, a dedicated plugin for that like this one might be a better fit.

HighCommander4 avatar Mar 06 '24 19:03 HighCommander4

I am using the clang-tidy integration in the Microsoft C/C++ extension, but it has the same limitation as the one you linked. They both use the clang-tidy executable and not clangd, which means that the diagnostics are only available on file save, and it can take about 30 seconds for them to run. I have not found any extension providing the clang-tidy checks on-the-fly except for this one, but it is providing a lot more that I don't need to use because the Microsoft extension provides it.

philippewarren avatar Mar 06 '24 19:03 philippewarren

Ok, I see.

We can probably consider adding feature toggles on a case-by-case basis. We recently had https://github.com/clangd/vscode-clangd/issues/588 filed about disabling auto-completion.

Can you list other features you'd like to disable?

HighCommander4 avatar Mar 06 '24 19:03 HighCommander4

Most features. I'd like to be able to use the clangd provided diagnostics as an addition, while still using the Microsoft C/C++ extension for most functionnalities (autocompletion, navigation, syntax highlighting, etc.) Is it doable?

philippewarren avatar Mar 06 '24 21:03 philippewarren

Technically it's probably doable.

I'd be interested in learning more about the use case though. Why do you prefer the Microsoft extension's navigation or syntax highlighting to clangd's?

HighCommander4 avatar Mar 06 '24 21:03 HighCommander4

Actually, I really like clangd.

There used to be a bug in the MS C++ extension that caused it to fail to start if IntelliSense was disabled, which caused problems with an extension which depended on it for it's debugging functionnality. Also, since clangd is only a language server, some features were then missing (debugging, for instance). It should be better now, as this was a while ago and should have been fixed since.

I'll give clangd another shot, whilst having the MS C++ extension enabled, but with IntelliSense disabled. Maybe that will be good for my use.

Also, the configuration options are harder to work with using clangd. The clangd configuration page on the website could be mentionned in the README so that it is visible when installing the extension. There could be an option to export a default .clangd configuration file with all settings set to the default values, to allow discovery of what is possible (probably a separate issue though).

philippewarren avatar Mar 07 '24 00:03 philippewarren