Folder icons (#2764)

Mikayla Maki created

- Updates icons and adds more
- Adds ability to choose folders or chevrons in user settings
- Adds ability to set indent size in user settings

Change summary

assets/icons/file_icons/archive.svg                |  6 
assets/icons/file_icons/audio.svg                  |  6 +
assets/icons/file_icons/book.svg                   |  6 +
assets/icons/file_icons/camera.svg                 |  4 
assets/icons/file_icons/chevron_down.svg           |  3 
assets/icons/file_icons/chevron_left.svg           |  3 
assets/icons/file_icons/chevron_right.svg          |  3 
assets/icons/file_icons/chevron_up.svg             |  3 
assets/icons/file_icons/code.svg                   |  4 
assets/icons/file_icons/database.svg               |  2 
assets/icons/file_icons/eslint.svg                 |  2 
assets/icons/file_icons/file.svg                   |  4 
assets/icons/file_icons/file_types.json            | 26 +++++--
assets/icons/file_icons/folder-open.svg            |  4 -
assets/icons/file_icons/folder.svg                 |  5 
assets/icons/file_icons/folder_open.svg            |  5 +
assets/icons/file_icons/git.svg                    |  2 
assets/icons/file_icons/image.svg                  |  7 +
assets/icons/file_icons/lock.svg                   |  4 
assets/icons/file_icons/notebook.svg               |  6 +
assets/icons/file_icons/package.svg                |  3 
assets/icons/file_icons/prettier.svg               | 10 +-
assets/icons/file_icons/rust.svg                   |  2 
assets/icons/file_icons/settings.svg               |  0 
assets/icons/file_icons/terminal.svg               |  2 
assets/icons/file_icons/toml.svg                   |  5 +
assets/icons/file_icons/typescript.svg             |  1 
assets/icons/file_icons/video.svg                  |  4 +
assets/settings/default.json                       | 20 +++--
crates/project_panel/src/file_associations.rs      | 25 +++++++
crates/project_panel/src/project_panel.rs          | 50 ++++++++-------
crates/project_panel/src/project_panel_settings.rs | 16 +++-
32 files changed, 158 insertions(+), 85 deletions(-)

Detailed changes

assets/icons/file_icons/archive.svg 🔗

@@ -1,5 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M6 7.63H8" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
-<rect x="2" y="2" width="10" height="3" rx="1" stroke="black" stroke-width="1.25"/>
-<path d="M3 5H11L10.5663 11.0712C10.529 11.5946 10.0935 12 9.56888 12H4.43112C3.90648 12 3.47104 11.5946 3.43366 11.0712L3 5Z" stroke="black" stroke-width="1.25"/>
+<path d="M6 7.63H8" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<rect x="2" y="2" width="10" height="3" rx="0.5" fill="black" fill-opacity="0.33" stroke="black" stroke-width="1.25"/>
+<path d="M3 5H11L10.5332 11.5356C10.5145 11.7973 10.2968 12 10.0344 12H3.96556C3.70324 12 3.48552 11.7973 3.46683 11.5356L3 5Z" stroke="black" stroke-width="1.25"/>
 </svg>

assets/icons/file_icons/audio.svg 🔗

@@ -0,0 +1,6 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 11C5.46973 11 4.1268 11.1873 3.31522 11.3327C2.94367 11.3992 2.60079 11.0563 2.66733 10.6848C2.81266 9.8732 3 8.53027 3 7C3 5.8387 2.89211 4.78529 2.77656 3.99011C2.73589 3.71017 3.19546 3.51715 3.36119 3.7464C4.09612 4.76304 5.23301 6.23301 6.5 7.5C7.76699 8.76699 9.23696 9.90388 10.2536 10.6388C10.4828 10.8045 10.2898 11.2641 10.0099 11.2234C9.21472 11.1079 8.1613 11 7 11Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M12.3594 3.35938C12.3594 3.35938 12.0146 2.9209 11.5312 2.4375C11.0479 1.9541 10.6406 1.64062 10.6406 1.64062" stroke="black" stroke-opacity="0.33" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M11.3516 7.36803C11.3516 7.36803 10.7962 5.88996 9.48438 4.57812C8.17254 3.26629 6.64062 2.64155 6.64062 2.64155" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round"/>
+<rect x="2.72266" y="8.73828" width="3.58525" height="2.72899" rx="0.5" transform="rotate(45 2.72266 8.73828)" fill="black"/>
+</svg>

assets/icons/file_icons/book.svg 🔗

@@ -1,4 +1,6 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M8 2C7.44772 2 7 2.44772 7 3V13C7.5 12 8.5 11.375 10 11.375H11C11.5523 11.375 12 10.9273 12 10.375V3C12 2.44772 11.5523 2 11 2H8Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M6 2C6.55228 2 7 2.44772 7 3V13C6.5 12 5.5 11.375 4 11.375H3C2.44772 11.375 2 10.9273 2 10.375V3C2 2.44772 2.44772 2 3 2H6Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M12 10L12 10.8374C12 10.9431 11.9665 11.046 11.9044 11.1315L11.1498 12.1691C11.0557 12.2985 10.9054 12.375 10.7454 12.375L3.25461 12.375C3.09464 12.375 2.94433 12.2985 2.85024 12.1691L2.09563 11.1315C2.03348 11.046 2 10.9431 2 10.8374L2 2" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M2 12V10L7 11H12V12H2Z" fill="black"/>
+<path d="M5.63246 2.04415C6.44914 2.31638 7 3.08066 7 3.94152V10.7306C7 11.0924 6.62757 11.3345 6.29693 11.1875L2.79693 9.63197C2.61637 9.55172 2.5 9.37266 2.5 9.17506V1.69371C2.5 1.35243 2.83435 1.11145 3.15811 1.21937L5.63246 2.04415Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M8.5 2C7.67157 2 7 2.67157 7 3.5V12C7 11.1954 10.2366 11.0382 11.5017 11.0075C11.7778 11.0008 12 10.7761 12 10.5V2.5C12 2.22386 11.7761 2 11.5 2H8.5Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
 </svg>

assets/icons/file_icons/camera.svg 🔗

@@ -1,4 +1,4 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M12 10.1111C12 10.602 11.593 11 11.0909 11H2.90909C2.40701 11 2 10.602 2 10.1111V5.22222C2 4.7313 2.40701 4.38 2.90909 4.38H4.72727L5.5 3H8.5L9.27273 4.38H11.0909C11.593 4.38 12 4.7313 12 5.22222V10.1111Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M7.005 9C7.90246 9 8.63 8.27246 8.63 7.375C8.63 6.47754 7.90246 5.75 7.005 5.75C6.10753 5.75 5.38 6.47754 5.38 7.375C5.38 8.27246 6.10753 9 7.005 9Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 10.5C12 10.7761 11.7761 11 11.5 11H2.5C2.22386 11 2 10.7761 2 10.5V4.88C2 4.60386 2.22386 4.38 2.5 4.38H4.4342C4.61518 4.38 4.78204 4.2822 4.87046 4.12428L5.35681 3.25572C5.44524 3.0978 5.61209 3 5.79308 3H8.20692C8.38791 3 8.55476 3.0978 8.64319 3.25572L9.12954 4.12428C9.21796 4.2822 9.38482 4.38 9.5658 4.38H11.5C11.7761 4.38 12 4.60386 12 4.88V10.5Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M7.005 9C7.90246 9 8.63 8.27246 8.63 7.375C8.63 6.47754 7.90246 5.75 7.005 5.75C6.10754 5.75 5.38 6.47754 5.38 7.375C5.38 8.27246 6.10754 9 7.005 9Z" fill="black" fill-opacity="0.33" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
 </svg>

assets/icons/file_icons/chevron_down.svg 🔗

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M3.63281 5.66406L6.99344 8.89844L10.3672 5.66406" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

assets/icons/file_icons/chevron_left.svg 🔗

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M8.35938 3.63281L5.125 6.99344L8.35938 10.3672" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

assets/icons/file_icons/chevron_right.svg 🔗

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M5.64062 3.64062L8.89062 7.00125L5.64062 10.375" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

assets/icons/file_icons/chevron_up.svg 🔗

@@ -0,0 +1,3 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M3.63281 8.36719L6.99344 5.13281L10.3672 8.36719" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

assets/icons/file_icons/code.svg 🔗

@@ -1,4 +1,4 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M5 2C3.5 2 2.25 3 3 4.5C3.5 5.5 3 6.5 2 6.99894C3 7.5 3.5 8.5 3 9.5C2.25 11 3 12 5 12" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9 2C10.5 2 11.75 3 11 4.5C10.5 5.5 11 6.5 12 6.99894C11 7.5 10.5 8.5 11 9.5C11.75 11 11 12 9 12" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.375 2C2.5 2 2.5 3.5 2.5 4.5C2.5 5.5 2 6.50106 1 7C2 7.50106 2.5 8.5 2.5 9.5C2.5 10.5 2.5 12 4.375 12" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9.63281 2C11.5078 2 11.5078 3.5 11.5078 4.5C11.5078 5.5 12.0078 6.50106 13.0078 7C12.0078 7.50106 11.5078 8.5 11.5078 9.5C11.5078 10.5 11.5078 12 9.63281 12" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
 </svg>

assets/icons/file_icons/database.svg 🔗

@@ -1,5 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<ellipse cx="7" cy="4" rx="5" ry="2" stroke="black" stroke-width="1.25"/>
+<ellipse cx="7" cy="4" rx="5" ry="2" fill="black" fill-opacity="0.33" stroke="black" stroke-width="1.25"/>
 <path d="M12 4V10C12 11.1046 9.76142 12 7 12C4.23858 12 2 11.1046 2 10V4" stroke="black" stroke-width="1.25"/>
 <path d="M12 7C12 8.10457 9.76142 9 7 9C4.23858 9 2 8.10457 2 7" stroke="black" stroke-width="1.25"/>
 </svg>

assets/icons/file_icons/eslint.svg 🔗

@@ -1,4 +1,4 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M12.3969 7.5625L11.8557 7.25L12.3969 7.5625C12.5979 7.21442 12.5979 6.78558 12.3969 6.4375L11.8557 6.75L12.3969 6.4375L10.1856 2.60737C9.98464 2.2593 9.61325 2.04487 9.21132 2.04487L4.78868 2.04487C4.38675 2.04487 4.01536 2.2593 3.8144 2.60737L1.60307 6.4375C1.40211 6.78558 1.40211 7.21442 1.60307 7.5625L3.8144 11.3926C4.01536 11.7407 4.38675 11.9551 4.78867 11.9551L9.21132 11.9551C9.61325 11.9551 9.98464 11.7407 10.1856 11.3926L12.3969 7.5625Z" stroke="black" stroke-width="1.25"/>
+<path d="M12.5413 7.3125C12.6529 7.11913 12.6529 6.88088 12.5413 6.6875L10.0413 2.35738C9.92962 2.164 9.72329 2.04488 9.5 2.04488L4.5 2.04488C4.27671 2.04488 4.07038 2.164 3.95873 2.35738L1.45873 6.6875C1.34709 6.88088 1.34709 7.11913 1.45873 7.3125L3.95873 11.6426C4.07038 11.836 4.27671 11.9551 4.5 11.9551L9.5 11.9551C9.72329 11.9551 9.92962 11.836 10.0413 11.6426L12.5413 7.3125Z" stroke="black" stroke-width="1.25" stroke-linejoin="round"/>
 <path d="M6.75 4.14434C6.9047 4.05502 7.0953 4.05502 7.25 4.14434L9.34808 5.35566C9.50278 5.44498 9.59808 5.61004 9.59808 5.78868V8.21132C9.59808 8.38996 9.50278 8.55502 9.34808 8.64434L7.25 9.85566C7.0953 9.94498 6.9047 9.94498 6.75 9.85566L4.65192 8.64434C4.49722 8.55502 4.40192 8.38996 4.40192 8.21132L4.40192 5.78868C4.40192 5.61004 4.49722 5.44498 4.65192 5.35566L6.75 4.14434Z" fill="black"/>
 </svg>

assets/icons/file_icons/file.svg 🔗

@@ -1,5 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 4H10" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M2 4H10" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round"/>
 <path d="M2 7H12" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M2 10H8" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M2 10H8" stroke="black" stroke-opacity="0.33" stroke-width="1.25" stroke-linecap="round"/>
 </svg>

assets/icons/file_icons/file_types.json 🔗

@@ -17,6 +17,7 @@
     "fish": "terminal",
     "gitattributes": "vcs",
     "gitignore": "vcs",
+    "gitmodules": "vcs",
     "gif": "image",
     "go": "code",
     "h": "code",
@@ -74,7 +75,7 @@
     "svg": "image",
     "swift": "code",
     "tiff": "image",
-    "toml": "settings",
+    "toml": "toml",
     "ts": "typescript",
     "tsx": "code",
     "txt": "document",
@@ -89,25 +90,31 @@
   },
   "types": {
     "audio": {
-      "icon": "icons/file_icons/file.svg"
+      "icon": "icons/file_icons/audio.svg"
     },
     "code": {
       "icon": "icons/file_icons/code.svg"
     },
-    "default": {
-      "icon": "icons/file_icons/file.svg"
+    "collapsed_chevron": {
+      "icon": "icons/file_icons/chevron_right.svg"
     },
-    "directory": {
+    "collapsed_folder": {
       "icon": "icons/file_icons/folder.svg"
     },
+    "default": {
+      "icon": "icons/file_icons/file.svg"
+    },
     "document": {
       "icon": "icons/file_icons/book.svg"
     },
     "eslint": {
       "icon": "icons/file_icons/eslint.svg"
     },
-    "expanded_directory": {
-      "icon": "icons/file_icons/folder-open.svg"
+    "expanded_chevron": {
+      "icon": "icons/file_icons/chevron_down.svg"
+    },
+    "expanded_folder": {
+      "icon": "icons/file_icons/folder_open.svg"
     },
     "image": {
       "icon": "icons/file_icons/image.svg"
@@ -136,6 +143,9 @@
     "terminal": {
       "icon": "icons/file_icons/terminal.svg"
     },
+    "toml": {
+      "icon": "icons/file_icons/toml.svg"
+    },
     "typescript": {
       "icon": "icons/file_icons/typescript.svg"
     },
@@ -143,7 +153,7 @@
       "icon": "icons/file_icons/git.svg"
     },
     "video": {
-      "icon": "icons/file_icons/file.svg"
+      "icon": "icons/file_icons/video.svg"
     }
   }
 }

assets/icons/file_icons/folder-open.svg 🔗

@@ -1,4 +0,0 @@
-<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M4.08592 5.30382C4.22115 4.89402 4.60401 4.61719 5.03555 4.61719H11.9295C12.6108 4.61719 13.0926 5.28358 12.8791 5.93056L11.2266 10.9384C11.0914 11.3482 10.7085 11.625 10.2769 11.625H3.38303C2.70174 11.625 2.2199 10.9586 2.4334 10.3116L4.08592 5.30382Z" stroke="black" stroke-width="1.25"/>
-<path d="M8 4.4024L7.27505 2.93264C7.10664 2.59119 6.75894 2.375 6.37821 2.375H3C2.44772 2.375 2 2.82272 2 3.375V4.4024V10.625C2 11.1773 2.44772 11.625 3 11.625H4.00781" stroke="black" stroke-width="1.25" stroke-linejoin="round"/>
-</svg>

assets/icons/file_icons/folder.svg 🔗

@@ -1,4 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 5.625C2 5.07272 2.44772 4.625 3 4.625H11C11.5523 4.625 12 5.07272 12 5.625V10.625C12 11.1773 11.5523 11.625 11 11.625H3C2.44772 11.625 2 11.1773 2 10.625V5.625Z" stroke="black" stroke-width="1.25"/>
-<path d="M8 4.375L7.27639 2.92779C7.107 2.589 6.76074 2.375 6.38197 2.375H3C2.44772 2.375 2 2.82272 2 3.375V8" stroke="black" stroke-width="1.25"/>
+<path d="M2 5.125C2 4.84886 2.22386 4.625 2.5 4.625H11.5C11.7761 4.625 12 4.84886 12 5.125V11.125C12 11.4011 11.7761 11.625 11.5 11.625H2.5C2.22386 11.625 2 11.4011 2 11.125V5.125Z" fill="black" fill-opacity="0.33" stroke="black" stroke-width="1.25" stroke-linejoin="round"/>
+<path d="M6.38197 2.375H2.5C2.22386 2.375 2 2.59886 2 2.875V4.375H8L7.27639 2.92779C7.107 2.589 6.76074 2.375 6.38197 2.375Z" fill="black"/>
+<path d="M2 8V4.375M2 4.375V2.875C2 2.59886 2.22386 2.375 2.5 2.375H6.38197C6.76074 2.375 7.107 2.589 7.27639 2.92779L8 4.375H2Z" stroke="black" stroke-width="1.25"/>
 </svg>

assets/icons/file_icons/folder_open.svg 🔗

@@ -0,0 +1,5 @@
+<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 2.53125H2.21875V10.625L4.5 4.59375H7.96875L7 2.53125Z" fill="black"/>
+<path d="M4.47293 4.94363C4.54554 4.74743 4.73263 4.61719 4.94184 4.61719H12.8755C13.2237 4.61719 13.4653 4.9642 13.3445 5.29074L11.1208 11.2986C11.0482 11.4948 10.8611 11.625 10.6519 11.625H2.71821C2.37002 11.625 2.12844 11.278 2.2493 10.9514L4.47293 4.94363Z" fill="black" fill-opacity="0.66" stroke="black" stroke-width="1.25"/>
+<path d="M8 4.4024L7.27505 2.93264C7.10664 2.59119 6.75894 2.375 6.37821 2.375H2.5C2.22386 2.375 2 2.59886 2 2.875V11.125C2 11.4011 2.22386 11.625 2.5 11.625H4.00781" stroke="black" stroke-width="1.25" stroke-linejoin="round"/>
+</svg>

assets/icons/file_icons/git.svg 🔗

@@ -1,6 +1,6 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
 <circle cx="4" cy="10" r="2" stroke="black" stroke-width="1.25"/>
-<circle cx="10" cy="4" r="2" stroke="black" stroke-width="1.25"/>
+<circle cx="10" cy="4" r="2" fill="black" fill-opacity="0.33" stroke="black" stroke-width="1.25"/>
 <line x1="3.625" y1="2.625" x2="3.625" y2="7.375" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
 <path d="M10 6V6C10 8.20914 8.20914 10 6 10V10" stroke="black" stroke-width="1.25"/>
 </svg>

assets/icons/file_icons/image.svg 🔗

@@ -1,6 +1,7 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
 <path d="M6.5 3C6.91421 3 7.25 2.66421 7.25 2.25C7.25 1.83579 6.91421 1.5 6.5 1.5C6.08579 1.5 5.75 1.83579 5.75 2.25C5.75 2.66421 6.08579 3 6.5 3Z" fill="black" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M3.375 2H3C2.44772 2 2 2.44772 2 3V11C2 11.5523 2.44772 12 3 12H7.35938M9.64062 2H11C11.5523 2 12 2.44772 12 3V11C12 11.5523 11.5523 12 11 12H10.125" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M2 10L5 7L7 9" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M6 8L9 5L12 8" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9 5L12 8L7.79316 9.40228C7.61349 9.46217 7.41541 9.41541 7.28149 9.28149L6 8L9 5Z" fill="black" fill-opacity="0.33"/>
+<path d="M2 10L5 7L7.375 9.375" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M6 8L7.5 6.5L9 5L10.5 6.5L12 8" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M3.375 2H2.5C2.22386 2 2 2.22386 2 2.5V11.5C2 11.7761 2.22386 12 2.5 12H7.35938M9.64062 2H11.5C11.7761 2 12 2.22386 12 2.5V11.5C12 11.7761 11.7761 12 11.5 12H10.125" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
 </svg>

assets/icons/file_icons/lock.svg 🔗

@@ -1,6 +1,6 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="3" y="5" width="8" height="7" rx="1" stroke="black" stroke-width="1.35"/>
-<path d="M4 4C4 2.89543 4.89543 2 6 2H8C9.10457 2 10 2.89543 10 4V5H4V4Z" stroke="black" stroke-width="1.35"/>
+<rect x="3" y="5" width="8" height="7" rx="0.5" stroke="black" stroke-width="1.25"/>
+<path d="M4 4C4 2.89543 4.89543 2 6 2H8C9.10457 2 10 2.89543 10 4V5H4V4Z" stroke="black" stroke-width="1.25"/>
 <circle cx="7" cy="8" r="1" fill="black"/>
 <path d="M7 8V9.375" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
 </svg>

assets/icons/file_icons/notebook.svg 🔗

@@ -1,6 +1,8 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M10.4 12H3.59997C2.71633 12 2 11.3367 2 10.5185V3.48148C2 2.66328 2.71633 2 3.59997 2H10.4C11.2837 2 12 2.66328 12 3.48148V10.5185C12 11.3367 11.2837 12 10.4 12Z" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M2.03125 2.96875C2.03125 2.41647 2.47897 1.96875 3.03125 1.96875H5V12H3.03125C2.47897 12 2.03125 11.5523 2.03125 11V2.96875Z" fill="black" fill-opacity="0.33"/>
+<rect x="2" y="2" width="10" height="10" rx="0.5" stroke="black" stroke-width="1.25"/>
 <path d="M9.5 5L7.5 5" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9.5 7H7.5" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9.5 7H7.5" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9.5 9H7.5" stroke="black" stroke-opacity="0.33" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
 <path d="M5 2V13" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
 </svg>

assets/icons/file_icons/package.svg 🔗

@@ -1,3 +1,4 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.62679 3.88473L6.99984 6.78517M1.62679 3.88473L1.63138 9.90006L7.00444 12.8005M1.62679 3.88473L4.31118 2.54212M6.99984 6.78517L7.00444 12.8005M6.99984 6.78517L9.68415 5.33085M7.00444 12.8005L12.3731 9.89186L12.3685 3.87652M4.31118 2.54212L6.99558 1.1995L12.3685 3.87652M4.31118 2.54212L9.68415 5.33085M12.3685 3.87652L9.68415 5.33085" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M1.62677 3.88472L6.99983 6.78517M1.62677 3.88472L1.63137 9.90006L7.00442 12.8005M1.62677 3.88472L4.31117 2.54211M6.99983 6.78517L7.00442 12.8005M6.99983 6.78517L9.68414 5.33084M7.00442 12.8005L12.373 9.89186L12.3684 3.87652M4.31117 2.54211L6.99556 1.1995L12.3684 3.87652M4.31117 2.54211L9.68414 5.33084M12.3684 3.87652L9.68414 5.33084" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M7.03125 12.5625V6.78125L1.5625 3.9375V9.75L7.03125 12.5625Z" fill="black" fill-opacity="0.33"/>
 </svg>

assets/icons/file_icons/prettier.svg 🔗

@@ -1,12 +1,12 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
 <path d="M2 2.86328H8.51563" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M11 2.86328L12 2.86328" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M9.64062 5.6263L12 5.6263" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M11 2.86328L12 2.86328" stroke="black" stroke-opacity="0.33" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M9.64062 5.6263L12 5.6263" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round"/>
 <path d="M4.79688 5.6263L7.15625 5.6263" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M2 5.6263L2.35937 5.6263" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M2 5.6263L2.35937 5.6263" stroke="black" stroke-opacity="0.33" stroke-width="1.25" stroke-linecap="round"/>
 <path d="M7.15625 8.3737L12 8.3737" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M2 8.3737L4.64062 8.3737" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M2 8.3737L4.64062 8.3737" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round"/>
 <path d="M2 11.1094H3.54687" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
 <path d="M5.97656 11.1094H8.35938" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
-<path d="M10.8203 11.1094L12 11.1094" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M10.8203 11.1094L12 11.1094" stroke="black" stroke-opacity="0.33" stroke-width="1.25" stroke-linecap="round"/>
 </svg>

assets/icons/file_icons/rust.svg 🔗

@@ -1,4 +1,4 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M4.27935 9.98207C4.32063 9.4038 3.9204 8.89049 3.35998 8.80276L2.60081 8.68387C2.37979 8.64945 2.20167 8.48001 2.15225 8.25614L2.01378 7.63511C1.96382 7.41235 2.05233 7.1807 2.23696 7.05125L2.8631 6.61242C3.33337 6.28297 3.47456 5.6369 3.18621 5.13364L2.79467 4.45092C2.68118 4.25261 2.69801 4.00374 2.83757 3.82321L3.22314 3.32436C3.3627 3.14438 3.59621 3.06994 3.81071 3.13772L4.57531 3.37769C5.11944 3.54879 5.70048 3.26159 5.90683 2.71886L6.1811 1.99782C6.26255 1.78395 6.46345 1.64285 6.68772 1.6423L7.31007 1.64063C7.53434 1.64007 7.73579 1.78006 7.81834 1.99337L8.09965 2.72275C8.30821 3.26214 8.88655 3.54712 9.42903 3.37714L10.1632 3.14716C10.3772 3.07994 10.6096 3.15382 10.7492 3.3327L11.1374 3.83099" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.27935 9.98207C4.32063 9.4038 3.9204 8.89049 3.35998 8.80276L2.60081 8.68387C2.37979 8.64945 2.20167 8.48001 2.15225 8.25614L2.01378 7.63511C1.96382 7.41235 2.05233 7.1807 2.23696 7.05125L2.8631 6.61242C3.33337 6.28297 3.47456 5.6369 3.18621 5.13364L2.79467 4.45092C2.68118 4.25261 2.69801 4.00374 2.83757 3.82321L3.22314 3.32436C3.3627 3.14438 3.59621 3.06994 3.81071 3.13772L4.57531 3.37769C5.11944 3.54879 5.70048 3.26159 5.90683 2.71886L6.1811 1.99782C6.26255 1.78395 6.46345 1.64285 6.68772 1.6423L7.31007 1.64063C7.53434 1.64007 7.73579 1.78006 7.81834 1.99337L8.09965 2.72275C8.30821 3.26214 8.88655 3.54712 9.42903 3.37714L10.1632 3.14716C10.3772 3.07994 10.6096 3.15382 10.7492 3.3327L11.1374 3.83099" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>

assets/icons/file_icons/terminal.svg 🔗

@@ -1,5 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="1.65625" y="2" width="10.6875" height="10" rx="1" stroke="black" stroke-width="1.25"/>
+<path d="M1.65625 2.5C1.65625 2.22386 1.88011 2 2.15625 2H11.8437C12.1199 2 12.3438 2.22386 12.3438 2.5V11.5C12.3438 11.7761 12.1199 12 11.8437 12H2.15625C1.88011 12 1.65625 11.7761 1.65625 11.5V2.5Z" stroke="black" stroke-width="1.25"/>
 <path d="M4.375 9L6.375 7L4.375 5" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
 <path d="M7.625 9L9.90625 9" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
 </svg>

assets/icons/file_icons/toml.svg 🔗

@@ -0,0 +1,5 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M5 5H9" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M7 5L7 10" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M4 2H2.5C2.22386 2 2 2.22386 2 2.5V11.5C2 11.7761 2.22386 12 2.5 12H4M10 2H11.5C11.7761 2 12 2.22386 12 2.5V11.5C12 11.7761 11.7761 12 11.5 12H10" stroke="black" stroke-opacity="0.66" stroke-width="1.25" stroke-linecap="round"/>
+</svg>

assets/icons/file_icons/typescript.svg 🔗

@@ -1,5 +1,5 @@
 <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M12 4.375V3C12 2.44772 11.5523 2 11 2H3C2.44772 2 2 2.44772 2 3V11C2 11.5523 2.44772 12 3 12H3.375" stroke="black" stroke-width="1.25" stroke-linecap="round"/>

assets/icons/file_icons/video.svg 🔗

@@ -0,0 +1,4 @@
+<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1.65625 2H11.8437C12.1199 2 12.3438 2.22386 12.3438 2.5V9.34375M12.3438 12H2.15625C1.88011 12 1.65625 11.7761 1.65625 11.5V4.65625" stroke="black" stroke-width="1.25" stroke-linecap="round"/>
+<path d="M9 7.01562L5.65624 9.3125L5.65624 4.6875L9 7.01562Z" fill="black" fill-opacity="0.33" stroke="black" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>

assets/settings/default.json 🔗

@@ -102,14 +102,18 @@
     "show_other_hints": true
   },
   "project_panel": {
-    // Whether to show the git status in the project panel.
-    "git_status": true,
-    // Whether to show file icons in the project panel.
-    "file_icons": true,
+    // Default width of the project panel.
+    "default_width": 240,
     // Where to dock project panel. Can be 'left' or 'right'.
     "dock": "left",
-    // Default width of the project panel.
-    "default_width": 240
+    // Whether to show file icons in the project panel.
+    "file_icons": true,
+    // Whether to show folder icons or chevrons for directories in the project panel.
+    "folder_icons": true,
+    // Whether to show the git status in the project panel.
+    "git_status": true,
+    // Amount of indentation for nested items.
+    "indent_size": 20
   },
   "assistant": {
     // Where to dock the assistant. Can be 'left', 'right' or 'bottom'.
@@ -203,9 +207,7 @@
   "copilot": {
     // The set of glob patterns for which copilot should be disabled
     // in any matching file.
-    "disabled_globs": [
-      ".env"
-    ]
+    "disabled_globs": [".env"]
   },
   // Settings specific to journaling
   "journal": {

crates/project_panel/src/file_associations.rs 🔗

@@ -17,8 +17,10 @@ pub struct FileAssociations {
     types: HashMap<String, TypeConfig>,
 }
 
-const DIRECTORY_TYPE: &'static str = "directory";
-const EXPANDED_DIRECTORY_TYPE: &'static str = "expanded_directory";
+const COLLAPSED_DIRECTORY_TYPE: &'static str = "collapsed_folder";
+const EXPANDED_DIRECTORY_TYPE: &'static str = "expanded_folder";
+const COLLAPSED_CHEVRON_TYPE: &'static str = "collapsed_chevron";
+const EXPANDED_CHEVRON_TYPE: &'static str = "expanded_chevron";
 pub const FILE_TYPES_ASSET: &'static str = "icons/file_icons/file_types.json";
 
 pub fn init(assets: impl AssetSource, cx: &mut AppContext) {
@@ -72,7 +74,24 @@ impl FileAssociations {
             let key = if expanded {
                 EXPANDED_DIRECTORY_TYPE
             } else {
-                DIRECTORY_TYPE
+                COLLAPSED_DIRECTORY_TYPE
+            };
+
+            this.types
+                .get(key)
+                .map(|type_config| type_config.icon.clone())
+        })
+        .unwrap_or_else(|| Arc::from("".to_string()))
+    }
+
+    pub fn get_chevron_icon(expanded: bool, cx: &AppContext) -> Arc<str> {
+        iife!({
+            let this = cx.has_global::<Self>().then(|| cx.global::<Self>())?;
+
+            let key = if expanded {
+                EXPANDED_CHEVRON_TYPE
+            } else {
+                COLLAPSED_CHEVRON_TYPE
             };
 
             this.types

crates/project_panel/src/project_panel.rs 🔗

@@ -1176,9 +1176,13 @@ impl ProjectPanel {
             }
 
             let end_ix = range.end.min(ix + visible_worktree_entries.len());
-            let (git_status_setting, show_file_icons) = {
+            let (git_status_setting, show_file_icons, show_folder_icons) = {
                 let settings = settings::get::<ProjectPanelSettings>(cx);
-                (settings.git_status, settings.file_icons)
+                (
+                    settings.git_status,
+                    settings.file_icons,
+                    settings.folder_icons,
+                )
             };
             if let Some(worktree) = self.project.read(cx).worktree_for_id(*worktree_id, cx) {
                 let snapshot = worktree.read(cx).snapshot();
@@ -1193,10 +1197,22 @@ impl ProjectPanel {
                 for entry in visible_worktree_entries[entry_range].iter() {
                     let status = git_status_setting.then(|| entry.git_status).flatten();
                     let is_expanded = expanded_entry_ids.binary_search(&entry.id).is_ok();
-                    let icon = show_file_icons.then(|| match entry.kind {
-                        EntryKind::File(_) => FileAssociations::get_icon(&entry.path, cx),
-                        _ => FileAssociations::get_folder_icon(is_expanded, cx),
-                    });
+                    let icon = match entry.kind {
+                        EntryKind::File(_) => {
+                            if show_file_icons {
+                                Some(FileAssociations::get_icon(&entry.path, cx))
+                            } else {
+                                None
+                            }
+                        }
+                        _ => {
+                            if show_folder_icons {
+                                Some(FileAssociations::get_folder_icon(is_expanded, cx))
+                            } else {
+                                Some(FileAssociations::get_chevron_icon(is_expanded, cx))
+                            }
+                        }
+                    };
 
                     let mut details = EntryDetails {
                         filename: entry
@@ -1258,7 +1274,6 @@ impl ProjectPanel {
         style: &ProjectPanelEntry,
         cx: &mut ViewContext<V>,
     ) -> AnyElement<V> {
-        let kind = details.kind;
         let show_editor = details.is_editing && !details.is_processing;
 
         let mut filename_text_style = style.text.clone();
@@ -1282,26 +1297,14 @@ impl ProjectPanel {
                     .aligned()
                     .constrained()
                     .with_width(style.icon_size)
-            } else if kind.is_dir() {
-                if details.is_expanded {
-                    Svg::new("icons/chevron_down_8.svg").with_color(style.chevron_color)
-                } else {
-                    Svg::new("icons/chevron_right_8.svg").with_color(style.chevron_color)
-                }
-                .constrained()
-                .with_max_width(style.chevron_size)
-                .with_max_height(style.chevron_size)
-                .aligned()
-                .constrained()
-                .with_width(style.chevron_size)
             } else {
                 Empty::new()
                     .constrained()
-                    .with_max_width(style.chevron_size)
-                    .with_max_height(style.chevron_size)
+                    .with_max_width(style.icon_size)
+                    .with_max_height(style.icon_size)
                     .aligned()
                     .constrained()
-                    .with_width(style.chevron_size)
+                    .with_width(style.icon_size)
             })
             .with_child(if show_editor && editor.is_some() {
                 ChildView::new(editor.as_ref().unwrap(), cx)
@@ -1337,7 +1340,8 @@ impl ProjectPanel {
     ) -> AnyElement<Self> {
         let kind = details.kind;
         let path = details.path.clone();
-        let padding = theme.container.padding.left + details.depth as f32 * theme.indent_width;
+        let settings = settings::get::<ProjectPanelSettings>(cx);
+        let padding = theme.container.padding.left + details.depth as f32 * settings.indent_size;
 
         let entry_style = if details.is_cut {
             &theme.cut_entry

crates/project_panel/src/project_panel_settings.rs 🔗

@@ -12,18 +12,22 @@ pub enum ProjectPanelDockPosition {
 
 #[derive(Deserialize, Debug)]
 pub struct ProjectPanelSettings {
-    pub git_status: bool,
-    pub file_icons: bool,
-    pub dock: ProjectPanelDockPosition,
     pub default_width: f32,
+    pub dock: ProjectPanelDockPosition,
+    pub file_icons: bool,
+    pub folder_icons: bool,
+    pub git_status: bool,
+    pub indent_size: f32,
 }
 
 #[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
 pub struct ProjectPanelSettingsContent {
-    pub git_status: Option<bool>,
-    pub file_icons: Option<bool>,
-    pub dock: Option<ProjectPanelDockPosition>,
     pub default_width: Option<f32>,
+    pub dock: Option<ProjectPanelDockPosition>,
+    pub file_icons: Option<bool>,
+    pub folder_icons: Option<bool>,
+    pub git_status: Option<bool>,
+    pub indent_size: Option<f32>,
 }
 
 impl Setting for ProjectPanelSettings {