clang-format on WSL on Windows with Visual Studio Code
この記事が助けになるかもしれない人
Windows 10上のVisual Studio CodeからWSLのUbuntuにremote接続して開発を行っている人が、clang formatを適用する。
適用方法
- WSL上のUbuntuにclang-formatをインストールする必要がある。
sudo apt-get update
sudo apt-get install clang-format
Visual Studio Codeにclang-formatのextensionをインストール
Visual Studio Code上の設定「Clang-format: Executable」にclang-formatのパスを設定
パスを確認
$ which clang-format
/usr/bin/clang-format
/usr/bin/clang-formatを「Clang-format: Executable」に設定
- 動いた!