Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add file icons for YAML, Helm and GitLab (#50529)

Tom Zaspel58ad0ff69184
diff --git a/assets/icons/file_icons/gitlab.svg b/assets/icons/file_icons/gitlab.svg
new file mode 100644
index 00000000000..f0faf570b12
--- /dev/null
+++ b/assets/icons/file_icons/gitlab.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#c6cad0" fill-rule="evenodd" d="m13.823 6.818-.017-.044-1.64-4.28a.43.43 0 0 0-.424-.267.45.45 0 0 0-.246.092.45.45 0 0 0-.146.221l-1.107 3.387H5.76L4.653 2.54a.43.43 0 0 0-.816-.044L2.195 6.773l-.017.043a3.045 3.045 0 0 0 1.105 3.465l.026.018L8 13.78l4.69-3.48.027-.019a3.04 3.04 0 0 0 1.106-3.462" clip-rule="evenodd"/></svg>
diff --git a/assets/icons/file_icons/helm.svg b/assets/icons/file_icons/helm.svg
new file mode 100644
index 00000000000..03e702f2d50
--- /dev/null
+++ b/assets/icons/file_icons/helm.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><g clip-path="url(#a)"><path fill="#c6cad0" fill-rule="evenodd" stroke="#c6cad0" stroke-width=".2" d="M1.726 6.448h.819v1.109h.99v-1.11h.818v3.116h-.819V8.375h-.989v1.188h-.819zm3.567 3.115V6.448H7.23v.677H6.112v.506h.99v.69h-.99v.573H7.23v.669zm2.835 0V6.448h.82V8.74h1.122v.823zm3.21-3.115 1.272 1.154 1.268-1.154h.37v3.115h-.824v-1.6l-.814.744-.82-.74v1.596h-.822V6.448z" clip-rule="evenodd"/><mask id="b" width="14" height="7" x="1" y="10" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M1.738 16.389h12.968V10.84H1.738z" clip-rule="evenodd"/></mask><g fill="#c6cad0" stroke="#c6cad0" stroke-width=".1" mask="url(#b)"><path d="M12.594 13.807c.074-.052.113-.138.126-.239s-.001-.221-.034-.353a2.9 2.9 0 0 0-.439-.897 2.9 2.9 0 0 0-.693-.719 1 1 0 0 0-.32-.152c-.099-.023-.193-.016-.268.036-.074.052-.113.138-.125.239q-.018.152.034.353c.067.264.22.583.439.897.219.313.467.565.693.719.112.076.221.13.32.152.098.023.192.017.267-.036ZM3.793 13.807c-.075-.052-.114-.138-.126-.239s0-.221.034-.353c.067-.264.219-.584.438-.897a2.9 2.9 0 0 1 .693-.719 1 1 0 0 1 .32-.152c.1-.023.194-.016.268.036s.113.138.125.239q.018.152-.034.353c-.066.264-.219.583-.438.897-.22.313-.468.565-.693.719a1 1 0 0 1-.32.152c-.099.023-.193.017-.267-.036ZM8.19 15.281c-.09 0-.172-.048-.24-.124a1 1 0 0 1-.174-.308 2.9 2.9 0 0 1-.156-.987c0-.382.059-.731.156-.986a1 1 0 0 1 .175-.309c.067-.075.149-.124.24-.124.09 0 .171.049.239.124a1 1 0 0 1 .175.309c.097.255.155.604.155.986 0 .383-.058.732-.155.987a1 1 0 0 1-.175.308c-.068.076-.148.124-.24.124Z"/></g><mask id="c" width="14" height="7" x="1" y="10" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M1.738 16.389h12.968V10.84H1.738z" clip-rule="evenodd"/></mask><g mask="url(#c)"><path stroke="#c6cad0" d="M12.146 10.293a4.77 4.77 0 0 1-4.087 2.32 4.76 4.76 0 0 1-4.018-2.207m.091-5.346A4.76 4.76 0 0 1 8.06 2.99c1.63 0 3.069.821 3.93 2.077"/></g><mask id="d" width="14" height="7" x="1" y="-1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M1.738-.389h12.968v5.63H1.738z" clip-rule="evenodd"/></mask><g fill="#c6cad0" stroke="#c6cad0" stroke-width=".1" mask="url(#d)"><path d="M12.594 2.174c.074.052.113.138.126.239s-.001.221-.034.353c-.067.264-.22.584-.439.897-.22.313-.467.566-.693.719a1 1 0 0 1-.32.152c-.099.023-.193.016-.268-.036-.074-.052-.113-.138-.125-.239q-.018-.152.034-.353c.067-.264.22-.583.439-.897a2.9 2.9 0 0 1 .693-.719 1 1 0 0 1 .32-.152c.098-.023.192-.016.267.036ZM3.793 2.174c-.075.052-.114.138-.126.239s0 .221.034.353c.067.264.219.584.438.897.22.313.468.566.693.719.113.076.222.13.32.152.1.023.194.016.268-.036s.113-.138.125-.239q.018-.152-.034-.353a2.9 2.9 0 0 0-.438-.897 2.9 2.9 0 0 0-.693-.719 1 1 0 0 0-.32-.152c-.099-.023-.193-.016-.267.036ZM8.19.7c-.09 0-.172.048-.24.124a1 1 0 0 0-.174.308 2.9 2.9 0 0 0-.156.987c0 .382.059.731.156.986a1 1 0 0 0 .175.309c.067.075.149.124.24.124.09 0 .171-.049.239-.124a1 1 0 0 0 .175-.309c.097-.255.155-.604.155-.986a2.9 2.9 0 0 0-.155-.987A1 1 0 0 0 8.43.824C8.362.748 8.282.7 8.19.7Z"/></g><mask id="e" width="14" height="7" x="1" y="-1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M1.738-.389h12.968v5.63H1.738z" clip-rule="evenodd"/></mask><g mask="url(#e)"><path stroke="#c6cad0" d="M12.146 5.688a4.77 4.77 0 0 0-4.087-2.32c-1.686 0-3.167.879-4.018 2.207m.091 5.346a4.76 4.76 0 0 0 3.927 2.071c1.63 0 3.069-.822 3.93-2.078"/></g></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
diff --git a/assets/icons/file_icons/yaml.svg b/assets/icons/file_icons/yaml.svg
new file mode 100644
index 00000000000..2c3efd46cd4
--- /dev/null
+++ b/assets/icons/file_icons/yaml.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path fill="#c6cad0" d="M2.067 2.422h1.364l1.3 2.14 1.427-2.14h1.364L5.26 5.604v1.818H4.15V5.604zM4.15 8.288h1.379l1.456 3.554h.062l1.457-3.554h1.38v5.29H8.798v-3.443h-.044l-1.37 3.417h-.738l-1.369-3.43h-.044v3.456H4.15zM10.547 13.578v-5.29h1.118v4.368h2.268v.922z"/><path fill="#c6cad0" d="M11.704 7.422h-1.31l-.365-1.055H7.865l-.412 1.055H6.145l2-5h1.573zm-3.5-1.928h1.52l-.694-2h-.045z" opacity=".5"/></svg>
diff --git a/crates/theme/src/icon_theme.rs b/crates/theme/src/icon_theme.rs
index 8415462595c..7c2d603281e 100644
--- a/crates/theme/src/icon_theme.rs
+++ b/crates/theme/src/icon_theme.rs
@@ -66,7 +66,7 @@ pub struct IconDefinition {
}
const FILE_STEMS_BY_ICON_KEY: &[(&str, &[&str])] = &[
- ("docker", &["Dockerfile"]),
+ ("docker", &["Containerfile", "Dockerfile"]),
("ruby", &["Podfile"]),
("heroku", &["Procfile"]),
];
@@ -99,6 +99,15 @@ const FILE_SUFFIXES_BY_ICON_KEY: &[(&str, &[&str])] = &[
("cue", &["cue"]),
("dart", &["dart"]),
("diff", &["diff"]),
+ (
+ "docker",
+ &[
+ "docker-compose.yml",
+ "docker-compose.yaml",
+ "compose.yml",
+ "compose.yaml",
+ ],
+ ),
(
"document",
&[
@@ -138,12 +147,27 @@ const FILE_SUFFIXES_BY_ICON_KEY: &[(&str, &[&str])] = &[
("font", &["otf", "ttf", "woff", "woff2"]),
("fsharp", &["fs"]),
("fsproj", &["fsproj"]),
- ("gitlab", &["gitlab-ci.yml"]),
+ ("gitlab", &["gitlab-ci.yml", "gitlab-ci.yaml"]),
("gleam", &["gleam"]),
("go", &["go", "mod", "work"]),
("graphql", &["gql", "graphql", "graphqls"]),
("haskell", &["hs"]),
("hcl", &["hcl"]),
+ (
+ "helm",
+ &[
+ "helmfile.yaml",
+ "helmfile.yml",
+ "Chart.yaml",
+ "Chart.yml",
+ "Chart.lock",
+ "values.yaml",
+ "values.yml",
+ "requirements.yaml",
+ "requirements.yml",
+ "tpl",
+ ],
+ ),
("html", &["htm", "html"]),
(
"image",
@@ -198,7 +222,7 @@ const FILE_SUFFIXES_BY_ICON_KEY: &[(&str, &[&str])] = &[
("rust", &["rs"]),
("sass", &["sass", "scss"]),
("scala", &["scala", "sc"]),
- ("settings", &["conf", "ini", "yaml", "yml"]),
+ ("settings", &["conf", "ini"]),
("solidity", &["sol"]),
(
"storage",
@@ -279,6 +303,7 @@ const FILE_SUFFIXES_BY_ICON_KEY: &[(&str, &[&str])] = &[
("vue", &["vue"]),
("vyper", &["vy", "vyi"]),
("wgsl", &["wgsl"]),
+ ("yaml", &["yaml", "yml"]),
("zig", &["zig"]),
];
@@ -310,12 +335,13 @@ const FILE_ICONS: &[(&str, &str)] = &[
("font", "icons/file_icons/font.svg"),
("fsharp", "icons/file_icons/fsharp.svg"),
("fsproj", "icons/file_icons/file.svg"),
- ("gitlab", "icons/file_icons/settings.svg"),
+ ("gitlab", "icons/file_icons/gitlab.svg"),
("gleam", "icons/file_icons/gleam.svg"),
("go", "icons/file_icons/go.svg"),
("graphql", "icons/file_icons/graphql.svg"),
("haskell", "icons/file_icons/haskell.svg"),
("hcl", "icons/file_icons/hcl.svg"),
+ ("helm", "icons/file_icons/helm.svg"),
("heroku", "icons/file_icons/heroku.svg"),
("html", "icons/file_icons/html.svg"),
("image", "icons/file_icons/image.svg"),
@@ -371,6 +397,7 @@ const FILE_ICONS: &[(&str, &str)] = &[
("vue", "icons/file_icons/vue.svg"),
("vyper", "icons/file_icons/vyper.svg"),
("wgsl", "icons/file_icons/wgsl.svg"),
+ ("yaml", "icons/file_icons/yaml.svg"),
("zig", "icons/file_icons/zig.svg"),
];