Skip to content

Latest commit

 

History

History
157 lines (99 loc) · 4.94 KB

README.md

File metadata and controls

157 lines (99 loc) · 4.94 KB

支持

  • Linux
  • MacOS
  • Windows

下载

预构建安装包

下载页面为 Releases.

安装

Linux/MacOS

依赖项

  • 必选项

    • neovim

      步骤:

      1. 下载 Latest stable release (macos x64, macos arm, linux)

      2. 解压, 并修改文件名为nvim

        tar -zxvf ./<目标文件> [-C <目标目录>]
        mv <解压出的文件夹名> nvim
      3. 移动解压的目录到 /usr/local/

        sudo mv ./nvim /usr/local
      4. 链接可执行文件 nvim 到 /usr/bin/

        sudo ln -sf /usr/local/bin/nvim /usr/bin/nvim
      5. 重启终端

Windows

依赖项

插件

依赖项

Note

方便起见, 可以先不安装这些插件的依赖项, 如果有报错再根据错误信息安装相应的依赖项即可 (<leader>n 可以用来查看通知历史, 包括错误信息).

  • global

    • npm

      • archlinux: sudo pacman -S --noconfirm npm
      • ubuntu: sudo apt-get -y install npm
      • fedora: sudo dnf install -y npm
      • macos: brew install node
  • markdown

    • markdownlint-cli2

      • archlinux: sudo pacman -S --noconfirm markdownlint-cli2
      • macos: brew install markdownlint-cli2

补充

QAs

Linux

  • 添加 AppImage ("universal" Linux package)

    The Releases page provides an AppImage that runs on most Linux systems. No installation is needed, just download nvim.appimage and run it. (It might not work if your Linux distribution is more than 4 years old.)

    curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
    chmod u+x nvim.appimage
    ./nvim.appimage

    To expose nvim globally:

    mkdir -p /opt/nvim
    mv nvim.appimage /opt/nvim/nvim

    And the following line to your shell config (~/.bashrc, ~/.zshrc, ...):

    export PATH="$PATH:/opt/nvim/"

    If the ./nvim.appimage command fails, try:

    ./nvim.appimage --appimage-extract
    ./squashfs-root/AppRun --version
    
    # Optional: exposing nvim globally.
    sudo mv squashfs-root /
    sudo ln -s /squashfs-root/AppRun /usr/bin/nvim
    nvim

Windows

  • 缺失 VCRUNTIME140.dll

    1. If you are missing VCRUNTIME140.dll, install the Visual Studio 2015 C++ redistributable (choose x86_64 or x86 depending on your system).
    2. Choose a package (nvim-winXX.zip) from the releases page.
    3. Unzip the package. Any location is fine, administrator privileges are not required.
    • $VIMRUNTIME will be set to that location automatically.
    1. Run nvim.exe from a terminal.
  • Windows 系统无法使用 nvim 编辑文件

    添加PATH: 添加 nvim 程序的 bin 文件夹 (e.g. C:\Program Files\nvim\bin) 到系统 PATH.

  • 拼写检查无效

    If :set spell does not work, create the C:/Users/foo/AppData/Local/nvim/site/spell folder.

    You can then copy your spell files over (for English, located here and here);

  • For Python plugins you need the pynvim module. "Virtual envs" are recommended.

    1. After activating the virtual env do pip install pynvim (in both). Edit your init.vim so that it contains the path to the env's Python executable:

      let g:python3_host_prog='C:/Users/foo/Envs/neovim3/Scripts/python.exe'
    2. Run :checkhealth and read :help provider-python.