Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daqingshu/9e1ac859a6497a9da5de7b47d6b19ada to your computer and use it in GitHub Desktop.
Save daqingshu/9e1ac859a6497a9da5de7b47d6b19ada to your computer and use it in GitHub Desktop.
integrate msys2 to VSCode and JetBrains on windows inheriting the path variable from the user. optionally you can install fish with msys2, intuitive terminal, I recommend it

FOR VSCODE IN FILE settings.json

"terminal.integrated.profiles.windows": {
  "Bash": {
    "path": "C:\laragon\bin\git\bin\bash.exe",
  },
  "MSYS2": {
    "path": "C:\msys64\usr\bin\bash.exe",
    "label": "MSYS2",
    "args": ["--login", "-i"],
    "env": {
      "MSYSTEM": "MINGW64",
      "CHERE_INVOKING": "1",
      "MSYS2_PATH_TYPE": "inherit"
    },
  },
  "FISH": {
    "path": "C:\msys64\usr\bin\fish.exe",
    "label": "MSYS2",
    "args": ["--login", "-i"],
    "env": {
      "MSYSTEM": "MINGW64",
      "CHERE_INVOKING": "1",
      "MSYS2_PATH_TYPE": "inherit"
    },
  },
},

IN JETBRAINS SETTINGS->TOOLS->TERMINAL

IN ENVIRONMENT VARIABLES CONFIGURATION MSYSTEM=MINGW64;CHERE_INVOKING=1;MSYS2_PATH_TYPE=inherit IN SHELL PATH CONFIGURATION C:\msys64\usr\bin\bash.exe --login -i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment