- Install VSCode or Cursor.
- Note: if you are using Cursor, please initially install extensions from VSCode, then import them to Cursor. Indeed, Cursor does not have the --install-extension option and some extensions may not be available while working well.
- Copy and rename the folder
vscodeto.vscodeat your project root folder. - Copy and rename the file
clang-formatas.clang-formatat your project root folder.
code --list-extensionsInstall extensions from a given file:
for i in `cat extensions.txt`; do code --install-extension $i; doneInstall / uninstall:
code --install-extension ms-vscode.cpptools
code --uninstall-extension ms-vscode.cpptoolsPopulate the compile_commands.json at the root of your root of your project:
bear --output .vscode/compile_commands.json -- make -j8See: https://medium.com/@pranjalchanda08/sonarlint-for-c-c-with-makefile-support-on-vs-code-20b2021dec2
To install bear:
sudo apt-get install bear