网页后端测试。主要测试点赞评论收藏一键三连(并没有)。

离开了codex和chatgpt我已经不会走路。

十分钟快速环境配置

1、powerlevel10k经典配置。

sudo apt update
sudo apt install -y zsh git curl wget

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sh -c "$(curl -fsSL https://install.ohmyz.sh)"
ls -la ~/.oh-my-zsh


git clone --depth=1 \
https://github.com/romkatv/powerlevel10k.git \
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

vim ~/.zshrc

修改ZSH_THEME="powerlevel10k/powerlevel10k"

exec zsh

git clone https://github.com/zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

然后配置
plugins=(
    git
    zsh-autosuggestions
    zsh-syntax-highlighting
)

2、gcc,gfortran, openmpi .or. mpich 安装。

sudo apt update
sudo apt install -y build-essential gfortran
sudo apt install -y openmpi-bin libopenmpi-dev
sudo apt install -y gdb

3、neovim到lazyvim。

lazyvim的官网其实已经把需要安装的东西都列出来了,有几个非常坑的点,首先是版本号,neovim的版本号>0.11.2,但是一般的ubuntu这些稳定版本的linux的库,不会到这么高,比如我这个wsl的apt install neovim版本,

可怜的0.6.1版本

我们只需要引入

sudo apt update
sudo apt install -y software-properties-common
使用software-properties-common获取unstable版本即可

sudo add-apt-repository ppa:neovim-ppa/unstable

这时查看
❯ apt policy neovim
neovim:
  Installed: (none)
  Candidate: 0.12.0~ubuntu1+git202609031423-f1d89e874a-793e58f65d-08bd7cbcf6~ubuntu22.04.1
  Version table:
     0.12.0~ubuntu1+git202609031423-f1d89e874a-793e58f65d-08bd7cbcf6~ubuntu22.04.1 500
        500 https://ppa.launchpadcontent.net/neovim-ppa/unstable/ubuntu jammy/main amd64 Packages
     0.6.1-3 500
        500 http://anycast-mirrors.as25820.net/ubuntu jammy/universe amd64 Packages

高达0.12.0!虽然这里不存在高达。

图片描述

按照lazyvim的这个清单一个个装下来,最后

git clone https://github.com/LazyVim/starter ~/.config/nvim

然后打开nvim即可。最后是补全之类的配置。

这时我们打开nvim可以看到

图片描述

我们只需要输入

:Mason

然后回车,就可以打开Language支持配置列表了,只需要把我们经常用的语言配置进来,

图片描述

哇,我们的neovim已经太豪华了,vscode可以丢掉了!(请你们在评论区打架,不关我的事,我只是拱火的。)