Skip to content

Instantly share code, notes, and snippets.

@KnightChaser
Created February 20, 2025 07:00
Show Gist options
  • Save KnightChaser/e8f8126d06f87a2f7cbf30d6ecd09179 to your computer and use it in GitHub Desktop.
Save KnightChaser/e8f8126d06f87a2f7cbf30d6ecd09179 to your computer and use it in GitHub Desktop.
Setting 1 tab = 4 spaces for C/C++ development with Neovim.
BasedOnStyle: LLVM
IndentWidth: 4
# If you want your vim/neovim or other editor follows "1 tab = 4 spaces" for C/C++ development,
# Save this as `.clang-format` in root of your project directory. And reload the editor again. Tada.
# In my case, `clangd` installed on Mason@Neovim initially set "1 tab = 2 spaces". So I wanted to change it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment