VS Code questions

Hello, I have installed VS code (via RPM) as my main editor. I mostly program in C, and I love features such as enhanced colorization, especially the darkened code under false preprocessor if-else-then. unfortunately this doesen’t seem to be working on Clear Linux (only other OS I tried is Windows, where it works correctly). Anyone with either the RPM or flatpak version is able to confirm this?

You don’t need to install the RPM. Actually there’s one version on official website that you can download and run.
For the syntax highlighting, if it relies on external program, such as ccls, ctags, etc, you may need to build them from source.

I think it relies on the Microsoft Intellisense engine and the Microsoft C/C++ language extension. I’ve already had problem with that extension because it reported some errors about a system library (like libc5.so, I don’t remember) so I had to make it use the system clang-format instead of the built-in one. For the other components I have no idea whether it’s possible to compile them separately…

@doct0rHu I don’t see any runnable version… There are just the RPM, the DEB and the Snap store ones…

Now that’s what I call good website design :man_facepalming:

you cannot find the entrance easily. I found this via Google.

Anyway, even in this version the Intellisense isn’t working properly. I posted a bug report on the vscode/cpptools git, but if anyone could check if this issue is common it would be appreciated :slightly_smiling_face:

To replicate: simply install VS Code, enable the C language extension, and copy this code:

#define __USE_POSIX
#include <stdio.h>
#define SOME_THING

int main(void)
{
#ifndef SOME_THING
    int a;
#else
    FILE* f;
    test_type_t var;
#endif
    int fd = fileno(stdin);
    return 0;
}

Now check the following things:

  1. The FILE type should be colored differently than the test_type_t.
  2. The region between the #ifndef and #else should be colored differently (in my theme it is dimmed)
  3. When overing over the fileno() function, the prototype should appear (note: I don’t know if the fact that to me it doesen’t show up because intellisense isn’t working or because it looks up the usr/include/bits/stdio.h header instead of the /usr/include/stdio.h one (alphabetic search, pff…)