mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
feature: supports Zed
editor as an external editor (#477)
This commit is contained in:
parent
a00cf4f009
commit
ba9c3058ed
5 changed files with 8 additions and 0 deletions
|
@ -111,6 +111,7 @@ This app supports open repository in external tools listed in the table below.
|
||||||
| VSCodium | YES | YES | YES | VSCODIUM |
|
| VSCodium | YES | YES | YES | VSCODIUM |
|
||||||
| JetBrains Fleet | YES | YES | YES | FLEET |
|
| JetBrains Fleet | YES | YES | YES | FLEET |
|
||||||
| Sublime Text | YES | YES | YES | SUBLIME_TEXT |
|
| Sublime Text | YES | YES | YES | SUBLIME_TEXT |
|
||||||
|
| Zed | NO | YES | YES | ZED |
|
||||||
|
|
||||||
> [!NOTE]
|
> [!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.
|
> 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.
|
||||||
|
|
|
@ -149,6 +149,11 @@ namespace SourceGit.Models
|
||||||
TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT", platformFinder);
|
TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT", platformFinder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Zed(Func<string> platformFinder)
|
||||||
|
{
|
||||||
|
TryAdd("Zed", "zed", "\"{0}\"", "ZED", platformFinder);
|
||||||
|
}
|
||||||
|
|
||||||
public void FindJetBrainsFromToolbox(Func<string> platformFinder)
|
public void FindJetBrainsFromToolbox(Func<string> platformFinder)
|
||||||
{
|
{
|
||||||
var exclude = new List<string> { "fleet", "dotmemory", "dottrace", "resharper-u", "androidstudio" };
|
var exclude = new List<string> { "fleet", "dotmemory", "dottrace", "resharper-u", "androidstudio" };
|
||||||
|
|
|
@ -50,6 +50,7 @@ namespace SourceGit.Native
|
||||||
finder.Fleet(FindJetBrainsFleet);
|
finder.Fleet(FindJetBrainsFleet);
|
||||||
finder.FindJetBrainsFromToolbox(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}/JetBrains/Toolbox");
|
finder.FindJetBrainsFromToolbox(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}/JetBrains/Toolbox");
|
||||||
finder.SublimeText(() => FindExecutable("subl"));
|
finder.SublimeText(() => FindExecutable("subl"));
|
||||||
|
finder.Zed(() => FindExecutable("zed"));
|
||||||
return finder.Founded;
|
return finder.Founded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ namespace SourceGit.Native
|
||||||
finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Applications/Fleet.app/Contents/MacOS/Fleet");
|
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.FindJetBrainsFromToolbox(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Library/Application Support/JetBrains/Toolbox");
|
||||||
finder.SublimeText(() => "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl");
|
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;
|
return finder.Founded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
src/Resources/Images/ExternalToolIcons/zed.png
Normal file
BIN
src/Resources/Images/ExternalToolIcons/zed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Loading…
Reference in a new issue