From f1d35832f425814cf0ee5dd3513597999bb31fc0 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 8 Jun 2024 00:45:59 +0800 Subject: [PATCH] build(devcontainer): add omz plugins & verify extension signature VSCode fixed signature validation hangs in v1.90 --- .devcontainer/devcontainer.json | 4 +--- .devcontainer/post-create.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a891b7e..39c428d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,9 +6,7 @@ "customizations": { "vscode": { "settings": { - "terminal.integrated.defaultProfile.linux": "zsh", - // Speed up extension installation - "extensions.verifySignature": false + "terminal.integrated.defaultProfile.linux": "zsh" }, "extensions": [ // Liquid tags auto-complete diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 14422cb..a4bc282 100644 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -8,3 +8,11 @@ fi # Install dependencies for shfmt extension curl -sS https://webi.sh/shfmt | sh &>/dev/null + +# Add OMZ plugins +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions +sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc + +# Avoid git log use less +echo -e "\nunset LESS" >>~/.zshrc