Skip to content
/ settings Public

💗 = neovim + wezterm + starship + zoxide + fzf + ripgrep ...

License

Notifications You must be signed in to change notification settings

jwu/settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

119 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Settings

开发环境配置方案 (Windows, Mac, Linux)。包含了 Alacritty, WezTerm, Neovim, Starship, Zsh/Fish 等工具的配置。

Windows 配置方案

自动配置 (推荐)

此方案会自动下载便携版的工具到 %USERPROFILE%\bin 目录,并配置环境变量和配置文件链接。

  1. 打开 CMD 或 PowerShell。

  2. 克隆此仓库(建议路径):

    git clone https://github.com/jwu/settings.git %USERPROFILE%\bin\settings
  3. 进入 win 目录:

    cd %USERPROFILE%\bin\settings\win
  4. 运行安装脚本(自动下载以下工具):

    install.bat

    安装的工具包括:

    • Alacritty v0.16.1 (终端模拟器)
    • Nerd Fonts (FiraMono) v3.4.0 (图标字体)
    • Clink v1.9.9 + clink-completions v0.6.7 (增强 CMD)
    • Starship v1.24.2 (终端提示符)
    • fzf 0.67.0 (模糊搜索)
    • zoxide 0.9.8 (智能目录跳转)
    • fd 10.2.0 (更快的 find)
    • bat 0.24.0 (更好的 cat)
    • ripgrep 15.1.0 (更快的 grep)
    • lsd 1.1.2 (更好的 ls)
    • coreutils 0.5.0 (Unix 命令工具集)
  5. 运行配置脚本(创建配置文件链接):

    config.bat

手动配置

如果你更喜欢手动安装工具,请参考以下步骤:

  1. 安装工具:

  2. 配置文件映射:

    • Alacritty: 创建 %APPDATA%\alacritty\alacritty.toml 并引用 win/alacritty.toml
    • WezTerm: 复制或链接 common/wezterm.lua%USERPROFILE%\.wezterm.lua
    • LSD: 复制或链接 common/lsd.yaml%USERPROFILE%\.config\lsd\config.yaml
    • Neovim: 复制或链接 common/neovim.init.lua%LOCALAPPDATA%\nvim\init.lua
    • NeoVide: 复制或链接 common/neovide.config.toml%APPDATA%\neovide\config.toml
    • Clink: 配置 Clink 加载 win/clink_scripts 中的脚本。

Mac 配置方案

自动配置 (推荐)

脚本会自动安装 Homebrew 包,配置 Oh My Zsh,并链接配置文件。

  1. 打开终端。
  2. 克隆此仓库:
    git clone https://github.com/jwu/settings.git ~/bin/settings
  3. 运行安装脚本:
    cd ~/bin/settings/mac
    ./install.sh

手动配置

  1. 安装 Homebrew (如果尚未安装):

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. 安装软件包:

    # 命令行工具
    brew install starship zoxide neovim fzf lsd fd bat
    # GUI 应用
    brew install --cask wezterm alacritty neovide zed
  3. 配置 Shell (Zsh):

    • 安装 Oh My Zsh
    • 安装插件 zsh-autosuggestions
    • 参考或直接使用 mac/zsh.zshrc 的内容替换 ~/.zshrc
  4. 复制/链接配置文件:

    • common/wezterm.lua -> ~/.wezterm.lua
    • common/neovim.init.lua -> ~/.config/nvim/init.lua
    • common/neovide.config.toml -> ~/.config/neovide/config.toml
    • common/lsd.yaml -> ~/.config/lsd/config.yaml
    • mac/starship.toml -> ~/.config/starship.toml
    • mac/alacritty.toml -> ~/.config/alacritty/alacritty.toml

Linux 配置方案

自动配置

开发中 (WIP)...

手动配置

  1. 安装工具: 使用你的发行版包管理器 (apt, pacman, yum 等) 或参考官方文档安装:

    • alacrittywezterm (终端模拟器)
    • fish (推荐 Shell), starship, git, neovim, fzf, lsd, fd, bat
  2. 配置文件映射:

    • Fish Shell: 编辑 ~/.config/fish/config.fish,添加环境变量初始化。
    • Alacritty: 复制 linux/alacritty.toml~/.config/alacritty/alacritty.toml
    • Starship: 复制 linux/starship.toml~/.config/starship.toml
    • Neovim: 复制 common/neovim.init.lua~/.config/nvim/init.lua

开发环境配置

自动配置 (推荐)

用于 macOS 的开发环境自动配置脚本,会安装以下开发工具和运行时:

  1. 打开终端。
  2. 进入 mac 目录:
    cd ~/bin/settings/mac
  3. 运行开发环境配置脚本:
    ./setup_dev.sh

安装的工具包括:

  • Xcode Command Line Tools - Apple 官方编译工具链
  • Git - 版本控制工具
  • Rust (rustup) - Rust 编程语言及工具链
  • uv - Python 快速包管理器和安装器
  • Bun - 快速的 JavaScript 运行时和包管理器
  • Zig - Zig 编程语言
  • tree-sitter-cli - 解析器生成工具
  • Node.js (LTS) - JavaScript 运行时(通过 NVM)

手动配置

如果你更喜欢手动安装这些工具,请按照以下步骤操作:

1. 安装 Xcode Command Line Tools

xcode-select --install

等待安装对话框完成。

2. 安装 Git (如果尚未安装)

brew install git

3. 安装 Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"

4. 安装 uv (Python 工具)

curl -LsSf https://astral.sh/uv/install.sh | sh

5. 安装 Bun

curl -fsSL https://bun.sh/install | bash

6. 安装 Zig

brew install zig

7. 安装 tree-sitter-cli

cargo install tree-sitter-cli

8. 安装 Node.js (通过 NVM)

export NVM_DIR="$HOME/.nvm"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --lts
nvm use --lts
nvm alias default 'lts/*'

Neovim + NeoVide 手动安装手册

Windows

  1. 安装 nvim
  2. 安装 neovide
  3. 先运行一下
  4. 复制 init.luac:\Users\${YOUR_NAME}\AppData\Local\nvim\init.lua
  5. 复制 config.tomlc:\Users\${YOUR_NAME}\AppData\Roaming\neovide\config.toml
  6. 安装 lazy.nvim
  7. 安装 rg
  8. 安装 fonts
  9. 编译 nvim-treesitter parsers
  10. 阅读 MSVC session
  11. 安装 Visual Studio Build Tools
  12. 打开 x64 Native Tools Command Prompt
  13. 打开 neovide
  14. 输入 :TSUpdate
  15. 等待安装结束

Linux

  1. 安装 nvim
  2. sudo cp -r nvim-linux64/bin/ /usr/
  3. sudo cp -r nvim-linux64/lib/ /usr/
  4. sudo cp -r nvim-linux64/share/ /usr/
  5. 安装 neovide
  6. sudo cp neovide-linux-x86_64/neovide /usr/bin/
  7. 更新 ubuntu desktop 1. sudo desktop-file-install neovide.desktop 1. sudo update-desktop-database
  8. 复制 init.lua~/.config/nvim
  9. 复制 config.toml~/.config/neovide
  10. 安装 lazy.nvim
  11. 安装 rg
  12. 安装 fonts
  13. 编译 nvim-treesitter parsers

Reference

About

💗 = neovim + wezterm + starship + zoxide + fzf + ripgrep ...

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published