Nvim定制2023最新方法

 

安装全流程

环境 MacBook M3Pro

配置 GitHub 公钥, 这个不说了, 主要是得有🪜

brew tap homebrew/cask-fonts
brew install font-jetbrains-mono-nerd-font # 最爱的字体
brew install nvim python prettier rustfmt openjdk go wget llvm
# python section
python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install pynvim

安装之后出现的问题汇总

打开 html 文件提示 html-languageserver 没安装

WARN Spawning language server with cmd: html-languageserver failed. The language server is either not installed, missing from PATH, or not executable

搜了一圈发现不是从Mason 安装的, 而是npm:

npm install --global vscode-html-languageserver-bin
# for test:
html-languageserver --stdio

vscode-langservers/vscode-html-languageserver-bin: Binary version published on npm of vscode-html-languageserver extracted from VSCode tree;