Thiết lập Terminal

ZSH

  • Cài đặt:
brew install zsh
chsh -s $(which zsh)
Lưu ý: Nếu bạn thấy thông báo “chsh: /opt/homebrew/bin/zsh: non-standard shell” trên terminal, hãy chạy các lệnh sau:
sudo sh -c "echo $(which zsh) >> /etc/shells"
chsh -s $(which zsh)

Oh My ZSH

Cài đặt:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Powerlevel10k (Giao diện)

Cài đặt:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git /themes/powerlevel10k

Thiết lập giao diện trên ZSH:

Mở file .zshrc và thay đổi giá trị của ZSH_THEME thành powerlevel10k/powerlevel10k.
Làm theo các bước hướng dẫn trên màn hình để chọn các tùy chỉnh giao diện.
zsh-syntax-highlighting (Làm nổi bật cú pháp)
Cài đặt:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /plugins/zsh-syntax-highlighting

Cập nhật file .zshrc với dòng sau: plugins=( [các plugin khác...] zsh-syntax-highlighting)

Lưu ý: Bạn cũng có thể kích hoạt bằng cách thêm dòng này vào file .zshrc:
# zsh-syntax-higlighting
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

zsh-autosuggestions (Gợi ý lệnh tự động)

Cài đặt:
git clone https://github.com/zsh-users/zsh-autosuggestions /plugins/zsh-autosuggestions

Cập nhật file .zshrc với: plugins=( [các plugin khác...] zsh-autosuggestions)

Mẹo: Cấu hình plugin trong file .zshrc của bạn sẽ trông như thế này nếu cài cả hai:
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)

Các tiện ích khác

ripgrep (Tìm kiếm nội dung tệp nhanh)

brew install ripgrep

tree (Hiển thị cấu trúc thư mục dạng cây)

brew install tree

Thiết lập Kotlin

Cài đặt:
brew install kotlin
kotlinc -version
brew install kotlin-language-server
Nguồn bài viết ryukato.github.io