~/.clangd

# 全局默认配置(可选)
CompileFlags:
  Add: [-Wall, -Wextra]
---
# 针对 C++ 的配置
If:
  PathMatch: .*\.(cpp|cc|cxx|hpp)$
CompileFlags:
  Compiler: /opt/homebrew/opt/llvm/bin/clang++
  Add:
    - "-std=c++23"
---
# 针对 C 的配置
If:
  PathMatch: .*\.(c|h)$
CompileFlags:
  Compiler: /opt/homebrew/opt/llvm/bin/clang
  Add:
    - "-std=c17"

~/.clang-format

---
BasedOnStyle: Google
IndentWidth: 4
InsertBraces: true

...