Use msys2 as integrated shell

VSCode

First, use Everything to search msys2_shell.cmd and get the full path. My path is long because I install msys2 by using scoop. Then, add config to VSCode setting.json file

1
2
"terminal.integrated.shell.windows": "path\\to\\msys2_shell.cmd",
"terminal.integrated.shellArgs.windows": ["-defterm", "-msys2", "-no-start", "-here"],

Goland

Go to Setting->Tools->Terminal->Shell Path and use string as follow

1
"path\\to\\msys2_shell.cmd" -defterm -msys2 -no-start -here

You can also change param -msys2 to -mingw64 which you like.