diff --git a/core/tabs/applications-setup/Developer-tools/zed.sh b/core/tabs/applications-setup/Developer-tools/zed.sh new file mode 100644 index 00000000..150d6214 --- /dev/null +++ b/core/tabs/applications-setup/Developer-tools/zed.sh @@ -0,0 +1,52 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installZed() { + if ! command_exists dev.zed.Zed && ! command_exists zed && ! command_exists zeditor; then + printf "%b\n" "${CYAN}Installing Zed.${RC}" + case "$PACKAGER" in + apk) + "$ESCALATION_TOOL" "$PACKAGER" add zed + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S zed + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" addrepo -f https://download.opensuse.org/repositories/editors/openSUSE_Tumbleweed/editors.repo + "$ESCALATION_TOOL" "$PACKAGER" install -y zed + ;; + *) + printf "%b\n" "${YELLOW}No official package found for package manager $PACKAGER. Do you want to install flathub package or from source?${RC}" + printf "%b\n" "1) Flathub package" + printf "%b\n" "2) Source" + printf "%b\n" "3) Exit" + printf "%b" "Choose an option: " + read -r choice + case "$choice" in + 1) + checkFlatpak + flatpak install -y flathub dev.zed.Zed + ;; + 2) + curl -f https://zed.dev/install.sh | sh + ;; + 3) + printf "%b\n" "${GREEN}Exiting.${RC}" + exit 0 + ;; + *) + printf "%b\n" "${RED}Invalid option.${RC}" + exit 1 + ;; + esac + ;; + esac + else + printf "%b\n" "${GREEN}Zed is already installed.${RC}" + fi +} + +checkEnv +clear +installZed diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index 4e6df84a..c6037480 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -107,6 +107,12 @@ description = "VSCodium is a free, open-source version of Visual Studio Code (VS script = "Developer-tools/vscodium-setup.sh" task_list = "I" +[[data.entries]] +name = "Zed" +description = "Zed is a next-generation code editor written in rust, designed for high-performance collaboration with humans and AI." +script = "Developer-tools/zed.sh" +task_list = "I" + [[data]] name = "Office Suites" diff --git a/docs/userguide.md b/docs/userguide.md index 11e598f8..0e55e96c 100644 --- a/docs/userguide.md +++ b/docs/userguide.md @@ -27,6 +27,7 @@ https://github.com/ChrisTitusTech/neovim - **Sublime Text**: Sublime Text is a fast, lightweight, and customizable text editor known for its simplicity, powerful features, and wide range of plugins for various programming languages. - **VS Code**: Visual Studio Code (VS Code) is a lightweight, open-source code editor with built-in support for debugging, version control, and extensions for various programming languages and frameworks. - **VS Codium**: VSCodium is a free, open-source version of Visual Studio Code (VS Code) that removes Microsoft-specific telemetry and branding. +- **Zed**: Zed is a next-generation code editor written in rust, designed for high-performance collaboration with humans and AI. ### Office Suites