背景
fomatterで有名なのがC++ならc-lang, pythonであればblack
いつも使ってるblackのインストール方法をメモ
install
blackをインストール
pip install black
gedit ~/.config/Code/User/settings.jsonで以下の2行を追加する
"python.formatting.provider": "black",
"editor.formatOnSave": true,
結論
・formatterあると便利!
参考文献
VSCode: Using Black to automatically format Python
https://dev.to/adamlombard/how-to-use-the-black-python-code-formatter-in-vscode-3lo0