diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
index 1e87012533..cfbb87385b
--- a/.gitignore
+++ b/.gitignore
@@ -114,3 +114,7 @@ applet/
 # Debug files
 *.dSYM/
 *.su
+
+#PlatformIO files/dirs
+.pioenvs
+.piolib
diff --git a/Marlin/platformio.ini b/Marlin/platformio.ini
index 8e66bd3f0d..a00864659d 100755
--- a/Marlin/platformio.ini
+++ b/Marlin/platformio.ini
@@ -13,6 +13,8 @@
 
 [platformio]
 src_dir = ./
+envs_dir = ../.pioenvs
+lib_dir = ../.piolib
 env_default = mega2560
 
 [env:mega2560]