mirror of
https://github.com/aljazceru/omakub.git
synced 2025-12-19 13:34:19 +01:00
Remove lazyvim extra configuration too
Until we can restore them on install
This commit is contained in:
@@ -6,18 +6,6 @@ else
|
|||||||
languages=$(gum choose "${AVAILABLE_LANGUAGES[@]}" --no-limit --height 10 --header "Select programming languages to uninstall")
|
languages=$(gum choose "${AVAILABLE_LANGUAGES[@]}" --no-limit --height 10 --header "Select programming languages to uninstall")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
disable_lazyvim_extras() {
|
|
||||||
local config_file="$HOME/.config/nvim/lazyvim.json"
|
|
||||||
local extras=("$@")
|
|
||||||
|
|
||||||
local extras_json
|
|
||||||
extras_json=$(printf '"%s",' "${extras[@]}")
|
|
||||||
extras_json="[${extras_json%,}]"
|
|
||||||
|
|
||||||
# This is cheating to mimic an in-place editing of files (without a tmp file)...
|
|
||||||
{ rm "$config_file" && jq --argjson extras "$extras_json" '.extras |= (. - $extras)' >"$config_file"; } <"$config_file"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -n $languages ]]; then
|
if [[ -n $languages ]]; then
|
||||||
for language in $languages; do
|
for language in $languages; do
|
||||||
case $language in
|
case $language in
|
||||||
@@ -27,17 +15,14 @@ if [[ -n $languages ]]; then
|
|||||||
;;
|
;;
|
||||||
Node.js)
|
Node.js)
|
||||||
mise uninstall node@lts
|
mise uninstall node@lts
|
||||||
disable_lazyvim_extras "lazyvim.plugins.extras.lang.typescript"
|
|
||||||
;;
|
;;
|
||||||
Go)
|
Go)
|
||||||
mise uninstall go@latest
|
mise uninstall go@latest
|
||||||
disable_lazyvim_extras "lazyvim.plugins.extras.lang.go"
|
|
||||||
;;
|
;;
|
||||||
PHP)
|
PHP)
|
||||||
sudo apt -y purge php8.4 php8.4-{curl,apcu,intl,mbstring,opcache,pgsql,mysql,sqlite3,redis,xml,zip}
|
sudo apt -y purge php8.4 php8.4-{curl,apcu,intl,mbstring,opcache,pgsql,mysql,sqlite3,redis,xml,zip}
|
||||||
sudo add-apt-repository -y --remove ppa:ondrej/php
|
sudo add-apt-repository -y --remove ppa:ondrej/php
|
||||||
sudo rm /usr/local/bin/composer
|
sudo rm /usr/local/bin/composer
|
||||||
disable_lazyvim_extras "lazyvim.plugins.extras.lang.php"
|
|
||||||
;;
|
;;
|
||||||
Python)
|
Python)
|
||||||
mise uninstall python@latest
|
mise uninstall python@latest
|
||||||
@@ -48,7 +33,6 @@ if [[ -n $languages ]]; then
|
|||||||
;;
|
;;
|
||||||
Rust)
|
Rust)
|
||||||
rustup self uninstall -y
|
rustup self uninstall -y
|
||||||
disable_lazyvim_extras "lazyvim.plugins.extras.lang.rust"
|
|
||||||
;;
|
;;
|
||||||
Java)
|
Java)
|
||||||
mise uninnstall java@latest
|
mise uninnstall java@latest
|
||||||
|
|||||||
Reference in New Issue
Block a user