Skip to content

Latest commit

 

History

History
226 lines (140 loc) · 6.88 KB

README.md

File metadata and controls

226 lines (140 loc) · 6.88 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
      • ubuntu: sudo apt install markdownlint

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
  • Python module

    • archlinux

      The Python module is available from the community repository:

      sudo pacman -S python-pynvim
    • ubuntu

      Python (:python) support is installable via the package manager on Debian unstable.

      sudo apt-get install python3-neovim
    • fedora

      Neovim is in Fedora starting with Fedora 25:

      sudo dnf install -y neovim python3-neovim

      You can also get nightly builds of git master from the Copr automated build system:

      dnf copr enable agriffis/neovim-nightly
      dnf install -y neovim python3-neovim

      See the blog post for information on how these are built.

  • Ruby modules

    • archlinux

      (currently only supported in neovim-git) are available from the AUR as ruby-neovim.

MacOS

  • Mac 系统没有 Alt 键,Option 键也不管用,如何设置 Command 快捷键

    在我们的配置中,Mac 系统的 Option 键对应的是 Windows 系统的 Alt 键,如果你的 Option 键没有反应,通常需要设置一下你的终端,将 Option 键设置为 Meta 键。

    • Item2: 设置方式为 Preference -> Profiles -> Default --> Keys --> Left Option key --> 选中 Esc+

    • alacritty: 设置 [window]option_as_altOnlyLeft, 如下所示:

      [window]
      option_as_alt = "OnlyLeft"

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.

  • windows 的 ubuntu 子系统下安装插件报错 could not find executable "unzip" in path?

    因为缺少压缩解压软件, 需要安装 zip unzip.

    sudo apt-get install zip unzip

参考