Since the day that Microsoft released Visual Studio Code, I had installed it on Windows instead of notepad++. Because VS Code does not have a built-in code formatter or beautifier by default, I was eager to see a more powerful VS Code with extensions. Now there it is. We can find many useful extensions on Visual Studio Marketplace. Recently I was writing C/C++ code on Ubuntu and found the extension Clang-Format for beautifying C/C++ code. Let’s take a glimpse of how to make clang-format works with Visual Studio Code on Windows and Linux.

- In VSCode search for the 'C# for Visual Studio Code' extension and install it. In Unity go to Package Manager and install Visual Studio Code Editor. This will enable Unity.
- The April 2021 update of the Visual Studio Code C extension is now available! This latest release offers brand new features—such as IntelliSense for CUDA C/C and native language server support for Apple Silicon— along with a bunch of enhancements and bug fixes.
And if you have a.cs file open, you get the option to Restart OmniSharp, which clears up c# issues, such as incorrect error-flagging for files, – Chris Nov 20 '19 at 19:11 @DrumM - to restart typescript in vscode. How can Visual Studio Code's intellisense cache for TypeScript be cleared? We are excited to announce a brand-new extension for building and debugging Makefile projects in Visual Studio Code: Makefile Tools (preview)!The extension is in pilot stages, but we’ve curated a list of over 70 popular opensource Makefile projects that work with Makefile Tools.
Getting Started with Clang-Format
To install an extension, we can press Ctrl+Shift+P and type in “install extension”. When all extensions listed, search for “format”, and you will see the Clang-Format: After installing the extension, you need to restart VSCode.

To format code, you can call Command Palette again with Ctrl+Shift+P, and then input “format”: The shortcut Ctrl+Shift+I is for Linux. If you want to use it on Windows, you need to use Alter+Shift+F.
If you do not have Clang-Format installed on your system, you will see the prompt:
How to Install Clang-Format on Windows
Download Clang for Windows (32-bit) or Clang for Windows (64-bit).
Install the package and add the path of %LLVM% bin to your system environment.
The shortcut Alter+Shift+F now works in Visual Studio Code for Windows.
How to Install Clang-Format on Ubuntu 14.04

There are two ways to install clang-format on Ubuntu 14.04: the stand-alone clang-format-3.4 or Clang for x86 _64 Ubuntu 14.04. The package size of stand-alone is much smaller than the full LLVM.
If you choose to install clang-format-3.4, the VS Code extension can’t work instantly. It will still prompt you that no clang-format found. Why? The installed clang-format tool is named clang-format-3.4:
To make it work, you just need to create a symlink:
C# Intellisense In Visual Studio Code
Alternatively, if you download and extract the LLVM package, you will find clang-format under clang+llvm/bin:
Similarly, create a symbolic link for clang-format:
Visual Studio Code Download
Now, you can format code with Ctrl+Shift+I in Visual Studio Code for Linux.
