vscode-clang-complete icon indicating copy to clipboard operation
vscode-clang-complete copied to clipboard

Visual Studio Code C/C++ completion using Clang

trafficstars

VSCode ClangComplete

Visual Studio Code C/C++ completion and diagnostics using Clang

Important Note

This minimal extension was done when the VSCode Language Server protocol was released, and does not require anything else than clang installed.

Though, LSP has now been standardized by Microsoft, and the LLVM team created their own implementation, named clangd, which also has an associated VSCode extension.

Install

Launch Quick Open (+P) and enter

ext install ClangComplete

Setup

You need to have Clang installed, and accessible via your path.

Compiler flags

Optional flags for Clang can be defined in a .clang_complete file at the root path of the project :

 -DDEBUG
 -include ../config.h
 -I../include

Development

Start the development script:

yarn dev

Debug

Start the Client + Server debug configuration from the Debug Panel.