From 1ce6e8d0e308f1901c482e03e9666551e5ad297e Mon Sep 17 00:00:00 2001 From: Sanjeev Shrestha Date: Wed, 12 Feb 2025 20:10:01 +0545 Subject: [PATCH] file_icons: Use separate keys for C#, Cue, GitLab YAML, Luau, and Solidity (#24711) This PR updates the file icon mappings such that: - C# (`.cs`) files map to the `csharp` key - Cue (`.cue`) files map to the `cue` key - GitLab YAML (`gitlab-ci.yml`) files map to the `gitlab` key - Luau (`.luau`) files map to the `luau` key - Solidity (`.sol`) files map to the `solidity` key Release Notes: - Icon themes: Added the ability to change the file icon for C# (`.cs`) files. - Icon themes: Added the ability to change the file icon for Cue (`.cue`) files. - Icon themes: Added the ability to change the file icon for GitLab YAML (`gitlab-ci.yml`) files. - Icon themes: Added the ability to change the file icon for Luau (`.luau`) files. - Icon themes: Added the ability to change the file icon for Solidity (`.sol`) files. --------- Co-authored-by: Marshall Bowers --- assets/icons/file_icons/file_types.json | 5 +++++ crates/theme/src/icon_theme.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/assets/icons/file_icons/file_types.json b/assets/icons/file_icons/file_types.json index ce6dd7953d..81c40e9b2f 100644 --- a/assets/icons/file_icons/file_types.json +++ b/assets/icons/file_icons/file_types.json @@ -27,11 +27,13 @@ "coffee": "coffeescript", "conf": "settings", "cpp": "cpp", + "cs": "csharp", "css": "css", "csv": "storage", "cxx": "cpp", "cts": "typescript", "ctsx": "react", + "cue": "cue", "dart": "dart", "dat": "storage", "db": "storage", @@ -66,6 +68,7 @@ "gitattributes": "vcs", "gitignore": "vcs", "gitkeep": "vcs", + "gitlab-ci.yml": "gitlab", "gitmodules": "vcs", "TAG_EDITMSG": "vcs", "MERGE_MSG": "vcs", @@ -113,6 +116,7 @@ "lockb": "bun", "log": "log", "lua": "lua", + "luau": "luau", "m4a": "audio", "m4v": "video", "markdown": "markdown", @@ -188,6 +192,7 @@ "scss": "sass", "sdf": "storage", "sh": "terminal", + "sol": "solidity", "sql": "storage", "sqlite": "storage", "stylelint.config.cjs": "stylelint", diff --git a/crates/theme/src/icon_theme.rs b/crates/theme/src/icon_theme.rs index 132826a9d5..b4690512c5 100644 --- a/crates/theme/src/icon_theme.rs +++ b/crates/theme/src/icon_theme.rs @@ -66,7 +66,9 @@ const FILE_ICONS: &[(&str, &str)] = &[ ("code", "icons/file_icons/code.svg"), ("coffeescript", "icons/file_icons/coffeescript.svg"), ("cpp", "icons/file_icons/cpp.svg"), + ("csharp", "icons/file_icons/file.svg"), ("css", "icons/file_icons/css.svg"), + ("cue", "icons/file_icons/file.svg"), ("dart", "icons/file_icons/dart.svg"), ("default", "icons/file_icons/file.svg"), ("diff", "icons/file_icons/diff.svg"), @@ -78,6 +80,7 @@ const FILE_ICONS: &[(&str, &str)] = &[ ("eslint", "icons/file_icons/eslint.svg"), ("font", "icons/file_icons/font.svg"), ("fsharp", "icons/file_icons/fsharp.svg"), + ("gitlab", "icons/file_icons/settings.svg"), ("gleam", "icons/file_icons/gleam.svg"), ("go", "icons/file_icons/go.svg"), ("graphql", "icons/file_icons/graphql.svg"), @@ -94,6 +97,7 @@ const FILE_ICONS: &[(&str, &str)] = &[ ("lock", "icons/file_icons/lock.svg"), ("log", "icons/file_icons/info.svg"), ("lua", "icons/file_icons/lua.svg"), + ("luau", "icons/file_icons/file.svg"), ("markdown", "icons/file_icons/book.svg"), ("metal", "icons/file_icons/metal.svg"), ("nim", "icons/file_icons/nim.svg"), @@ -112,6 +116,7 @@ const FILE_ICONS: &[(&str, &str)] = &[ ("sass", "icons/file_icons/sass.svg"), ("scala", "icons/file_icons/scala.svg"), ("settings", "icons/file_icons/settings.svg"), + ("solidity", "icons/file_icons/file.svg"), ("storage", "icons/file_icons/database.svg"), ("stylelint", "icons/file_icons/javascript.svg"), ("svelte", "icons/file_icons/html.svg"),