mitaki28 / vscode-clang

Completion and Diagnostic for C/C++/Objective-C using Clang
MIT License
128 stars 24 forks source link

How to disable clang STD libraries auto-complete? #18

Open Aukstkalnis opened 8 years ago

Aukstkalnis commented 8 years ago

I do not need this feature because I am using different libraries (KEIL libraries). When typing code it suggests functions and macros from clang libraries. What to do if I do not need those suggestions?

Mitsos101 commented 8 years ago

You can try removing the default includes with -nostdinc, then manually including the headers in your settings.json.

Aukstkalnis commented 8 years ago

No, this does not help: My work space settings are: "clang.cflags": ["-std=c99","-nostdinc","-I${workspaceRoot}/source_headers/**", "-IC:/Keil/ARM/RV31/INC"], This is what I get: clangcomplete

Mitsos101 commented 8 years ago

As far as I know, those _clang* things aren't part of the default LLVM libraries, but macros set by the clang compiler itself to check if clang is compiling the code, and if yes, which version. I don't know how to disable them, or if it even makes any sense.

Pouja commented 7 years ago

Do you happen to use the C/C++ extension? Because I would get the same, and it was due this plugin not finding any autocompletion so C/C++ auto completion would take over and give all kinds of nonsense.

Try "C_Cpp.autocomplete": "Disabled" setting that in your settings.json.

Aukstkalnis commented 7 years ago

I found a way for disabling clang's stdlib compleation :)

thecoder138 commented 7 years ago

I have a different annoying suggestions for autocomplete, which are not fixed by above clang flags. But I don't know where they originate.

The list is huge! __API_AVAILABLE_PLATFORM_ios DARWIN_ALIAS_STARTINGMACMAC_10_0 INT_FAST16_FMTd

I have disabled c/c++ extension autocomplete. so this should be purely due to clang adapter plugin.

Aukstkalnis commented 7 years ago

I was fast to jump to conclusion when I sad that I said it worked:/

rubenanapu commented 2 years ago

Hi @thecoder138, Could you tell us how you disabled C++ extension autocompletion?

I have disabled c/c++ extension autocomplete. so this should be purely due to the clang adapter plugin.

What I'm trying to do is basically disable warning messages of "file not found", but at the same time be able to "jump to class", "jump to method", and see "methods documentation".