clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
644 stars 113 forks source link

support add custom "defines" in a project #250

Closed gglin001 closed 3 years ago

gglin001 commented 3 years ago

just like "defines" or "C_Cpp.default.defines" in vsocde-cpptools

ref https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference

HighCommander4 commented 3 years ago

This can be done using clangd's config file, something like:

CompileFlags:
  Add: [-DMY_MACRO]