IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    开发环境搭建

    Grit的站点发表于 2023-10-14 13:44:30
    love 0
    该渲染由 Shiro API 生成,可能存在排版问题,最佳体验请前往:https://liu-wb.com/posts/technology/1

    1、安装clash-prop

    ClashX.dmg

    2、安装Wrap

    Warp.dmg

    3、安装brew

    /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

    4、安装oh-my-zsh

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

    安装好之后,需要把 zsh 设置为当前用户的默认 shell(这样新建命令的时候才会使用 zsh):

    chsh -s /bin/zsh

    4-1、声明高亮

    使用 Homebrew 安装:

    brew install zsh-syntax-highlighting

    安装成功之后,令编辑 ~/.zshrc 文件,在最后一行增加下面配置:

    source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

    4-2、自动补齐

    配置步骤,先克隆 zsh-autosuggestions 项目,到指定目录:

    git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions

    然后,编辑 ~/.zshrc 文件,找到 plugins 配置,增加 zsh-autosuggestions 插件:

    plugins=(git zsh-autosuggestions)

    5、安装node

    先用brwe search nodejs查看node的版本,然后选择合适的版本安装,我这是安装node@18版本

    brew install node@18

    安装最后会有提示,安装提示操作

    ==> Caveats
    node@18 is keg-only, which means it was not symlinked into /usr/local,
    because this is an alternate version of another formula.
    
    If you need to have node@18 first in your PATH, run:
    echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc
    
    For compilers to find node@18 you may need to set:
    export LDFLAGS="-L/usr/local/opt/node@18/lib"
    export CPPFLAGS="-I/usr/local/opt/node@18/include"
    ==> Summary
    🍺  /usr/local/Cellar/node@18/18.18.1: 2,337 files, 51.1MB
    ==> Running `brew cleanup node@18`...
    Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
    Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
    ==> Caveats
    ==> node@18
    node@18 is keg-only, which means it was not symlinked into /usr/local,
    because this is an alternate version of another formula.
    
    If you need to have node@18 first in your PATH, run:
    echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc
    
    For compilers to find node@18 you may need to set:
    export LDFLAGS="-L/usr/local/opt/node@18/lib"
    export CPPFLAGS="-I/usr/local/opt/node@18/include"

    按照提示输入

    echo 'export PATH="/usr/local/opt/node@18/bin:$PATH"' >> ~/.zshrc

    看完了?说点什么呢



沪ICP备19023445号-2号
友情链接