matthew as a q.

競技プログラミングメイン

clang-format on WSL on Windows with Visual Studio Code

この記事が助けになるかもしれない人

Windows 10上のVisual Studio CodeからWSLのUbuntuにremote接続して開発を行っている人が、clang formatを適用する。

適用方法

  1. WSL上のUbuntuにclang-formatをインストールする必要がある。

sudo apt-get update sudo apt-get install clang-format

  1. Visual Studio Codeにclang-formatのextensionをインストール

  2. Visual Studio Code上の設定「Clang-format: Executable」にclang-formatのパスを設定

パスを確認 $ which clang-format /usr/bin/clang-format

/usr/bin/clang-formatを「Clang-format: Executable」に設定

  1. 動いた!