diff --git a/README.md b/README.md index 170e7bd6..255d7c11 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ This app supports open repository in external tools listed in the table below. | VSCodium | YES | YES | YES | VSCODIUM | | JetBrains Fleet | YES | YES | YES | FLEET | | Sublime Text | YES | YES | YES | SUBLIME_TEXT | +| Zed | NO | YES | YES | ZED | > [!NOTE] > This app will try to find those tools based on some pre-defined or expected locations automatically. If you are using one portable version of these tools, it will not be detected by this app. diff --git a/src/Models/ExternalTool.cs b/src/Models/ExternalTool.cs index 45682dab..b26a9a90 100644 --- a/src/Models/ExternalTool.cs +++ b/src/Models/ExternalTool.cs @@ -149,6 +149,11 @@ namespace SourceGit.Models TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT", platformFinder); } + public void Zed(Func platformFinder) + { + TryAdd("Zed", "zed", "\"{0}\"", "ZED", platformFinder); + } + public void FindJetBrainsFromToolbox(Func platformFinder) { var exclude = new List { "fleet", "dotmemory", "dottrace", "resharper-u", "androidstudio" }; diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 9df41160..7c3f20f8 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -50,6 +50,7 @@ namespace SourceGit.Native finder.Fleet(FindJetBrainsFleet); finder.FindJetBrainsFromToolbox(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}/JetBrains/Toolbox"); finder.SublimeText(() => FindExecutable("subl")); + finder.Zed(() => FindExecutable("zed")); return finder.Founded; } diff --git a/src/Native/MacOS.cs b/src/Native/MacOS.cs index 0ad608b2..81918284 100644 --- a/src/Native/MacOS.cs +++ b/src/Native/MacOS.cs @@ -46,6 +46,7 @@ namespace SourceGit.Native finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Applications/Fleet.app/Contents/MacOS/Fleet"); finder.FindJetBrainsFromToolbox(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Library/Application Support/JetBrains/Toolbox"); finder.SublimeText(() => "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"); + finder.Zed(() => File.Exists("/usr/local/bin/zed") ? "/usr/local/bin/zed" : "/Applications/Zed.app/Contents/MacOS/cli"); return finder.Founded; } diff --git a/src/Resources/Images/ExternalToolIcons/zed.png b/src/Resources/Images/ExternalToolIcons/zed.png new file mode 100644 index 00000000..07c4c50f Binary files /dev/null and b/src/Resources/Images/ExternalToolIcons/zed.png differ