mirror of
https://github.com/neovim/neovim.git
synced 2026-04-23 07:45:32 +00:00
feat(ftplugin): treesitter default highlighting for markdown
This commit is contained in:
committed by
Christian Clason
parent
17d126049a
commit
dcbe5bdd96
4
.github/workflows/notes.md
vendored
4
.github/workflows/notes.md
vendored
@@ -48,7 +48,7 @@ If your system does not have the required glibc version, try the (unsupported) [
|
|||||||
1. Download **nvim-linux-x86_64.appimage**
|
1. Download **nvim-linux-x86_64.appimage**
|
||||||
2. Run `chmod u+x nvim-linux-x86_64.appimage && ./nvim-linux-x86_64.appimage`
|
2. Run `chmod u+x nvim-linux-x86_64.appimage && ./nvim-linux-x86_64.appimage`
|
||||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||||
```
|
```bash
|
||||||
./nvim-linux-x86_64.appimage --appimage-extract
|
./nvim-linux-x86_64.appimage --appimage-extract
|
||||||
./squashfs-root/usr/bin/nvim
|
./squashfs-root/usr/bin/nvim
|
||||||
```
|
```
|
||||||
@@ -66,7 +66,7 @@ If your system does not have the required glibc version, try the (unsupported) [
|
|||||||
1. Download **nvim-linux-arm64.appimage**
|
1. Download **nvim-linux-arm64.appimage**
|
||||||
2. Run `chmod u+x nvim-linux-arm64.appimage && ./nvim-linux-arm64.appimage`
|
2. Run `chmod u+x nvim-linux-arm64.appimage && ./nvim-linux-arm64.appimage`
|
||||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||||
```
|
```bash
|
||||||
./nvim-linux-arm64.appimage --appimage-extract
|
./nvim-linux-arm64.appimage --appimage-extract
|
||||||
./squashfs-root/usr/bin/nvim
|
./squashfs-root/usr/bin/nvim
|
||||||
```
|
```
|
||||||
|
|||||||
110
BUILD.md
110
BUILD.md
@@ -38,20 +38,20 @@ The _build type_ determines the level of used compiler optimizations and debug i
|
|||||||
|
|
||||||
So, for a release build, just use:
|
So, for a release build, just use:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
make CMAKE_BUILD_TYPE=Release
|
make CMAKE_BUILD_TYPE=Release
|
||||||
```
|
```
|
||||||
(Do not add a `-j` flag if `ninja` is installed! The build will be in parallel automatically.)
|
(Do not add a `-j` flag if `ninja` is installed! The build will be in parallel automatically.)
|
||||||
|
|
||||||
Afterwards, the `nvim` executable can be found in `build/bin`. To verify the build type after compilation, run:
|
Afterwards, the `nvim` executable can be found in `build/bin`. To verify the build type after compilation, run:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
./build/bin/nvim --version | grep ^Build
|
./build/bin/nvim --version | grep ^Build
|
||||||
```
|
```
|
||||||
|
|
||||||
To install the executable to a certain location, use:
|
To install the executable to a certain location, use:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
make CMAKE_INSTALL_PREFIX=$HOME/local/nvim install
|
make CMAKE_INSTALL_PREFIX=$HOME/local/nvim install
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ make distclean
|
|||||||
VERBOSE=1 DEBUG=1 make deps
|
VERBOSE=1 DEBUG=1 make deps
|
||||||
```
|
```
|
||||||
-->
|
-->
|
||||||
```
|
```bash
|
||||||
make distclean
|
make distclean
|
||||||
make deps
|
make deps
|
||||||
```
|
```
|
||||||
@@ -73,14 +73,16 @@ make deps
|
|||||||
### PUC Lua
|
### PUC Lua
|
||||||
|
|
||||||
To build with "PUC Lua" instead of LuaJit:
|
To build with "PUC Lua" instead of LuaJit:
|
||||||
|
```bash
|
||||||
make CMAKE_EXTRA_FLAGS="-DPREFER_LUA=ON" DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_LUA=ON"
|
make CMAKE_EXTRA_FLAGS="-DPREFER_LUA=ON" DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_LUA=ON"
|
||||||
|
```
|
||||||
|
|
||||||
### Build options
|
### Build options
|
||||||
|
|
||||||
View the full list of CMake options defined in this project:
|
View the full list of CMake options defined in this project:
|
||||||
|
```bash
|
||||||
cmake -B build -LH
|
cmake -B build -LH
|
||||||
|
```
|
||||||
|
|
||||||
## Building on Windows
|
## Building on Windows
|
||||||
|
|
||||||
@@ -115,7 +117,7 @@ To build from the command line (i.e. invoke the `cmake` commands yourself),
|
|||||||
'mingw32-gcc' is not recognized as an internal or external command
|
'mingw32-gcc' is not recognized as an internal or external command
|
||||||
```
|
```
|
||||||
2. From the "Developer PowerShell" or "Developer Command Prompt":
|
2. From the "Developer PowerShell" or "Developer Command Prompt":
|
||||||
```
|
```bash
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=Release
|
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||||
cmake --build .deps --config Release
|
cmake --build .deps --config Release
|
||||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
|
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||||
@@ -133,16 +135,17 @@ To build from the command line (i.e. invoke the `cmake` commands yourself),
|
|||||||
### Windows / Cygwin
|
### Windows / Cygwin
|
||||||
|
|
||||||
Since https://github.com/neovim/neovim/pull/36417 , building on Cygwin may be as easy as:
|
Since https://github.com/neovim/neovim/pull/36417 , building on Cygwin may be as easy as:
|
||||||
|
```bash
|
||||||
make && make install
|
make && make install
|
||||||
|
```
|
||||||
|
|
||||||
If that fails, an alternative is:
|
If that fails, an alternative is:
|
||||||
|
|
||||||
1. Install all dependencies the normal way.
|
1. Install all dependencies the normal way.
|
||||||
- The `cygport` repo contains Cygport files (e.g. `APKBUILD`, `PKGBUILD`) for all the dependencies not available in the Cygwin distribution, and describes any special commands or arguments needed to build. The Cygport definitions also try to describe the required dependencies for each one. Unless custom commands are provided, Cygport just calls `autogen`/`cmake`, `make`, `make install`, etc. in a clean and consistent way.
|
- The `cygport` repo contains Cygport files (e.g. `APKBUILD`, `PKGBUILD`) for all the dependencies not available in the Cygwin distribution, and describes any special commands or arguments needed to build. The Cygport definitions also try to describe the required dependencies for each one. Unless custom commands are provided, Cygport just calls `autogen`/`cmake`, `make`, `make install`, etc. in a clean and consistent way.
|
||||||
- https://github.com/cascent/neovim-cygwin was built on Cygwin 2.9.0. Newer `libuv` should require slightly less patching. Some SSP stuff changed in Cygwin 2.10.0, so that might change things too when building Neovim.
|
- https://github.com/cascent/neovim-cygwin was built on Cygwin 2.9.0. Newer `libuv` should require slightly less patching. Some SSP stuff changed in Cygwin 2.10.0, so that might change things too when building Neovim.
|
||||||
2. Build without "bundled" dependencies (except treesitter parsers).
|
2. Build without "bundled" dependencies (except treesitter parsers).
|
||||||
```
|
```bash
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS=ON
|
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS=ON
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
@@ -152,7 +155,7 @@ If that fails, an alternative is:
|
|||||||
### Windows / MSYS2 / MinGW
|
### Windows / MSYS2 / MinGW
|
||||||
|
|
||||||
1. From the MSYS2 shell, install these packages:
|
1. From the MSYS2 shell, install these packages:
|
||||||
```
|
```bash
|
||||||
pacman -S \
|
pacman -S \
|
||||||
mingw-w64-ucrt-x86_64-gcc \
|
mingw-w64-ucrt-x86_64-gcc \
|
||||||
mingw-w64-x86_64-{cmake,make,ninja,diffutils}
|
mingw-w64-x86_64-{cmake,make,ninja,diffutils}
|
||||||
@@ -218,7 +221,7 @@ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" make CMAKE_B
|
|||||||
Translations are turned off by default. Enable by building Nvim with the CMake flag `ENABLE_TRANSLATIONS=ON`.
|
Translations are turned off by default. Enable by building Nvim with the CMake flag `ENABLE_TRANSLATIONS=ON`.
|
||||||
Doing this will create `.mo` files in `build/src/nvim/po`. Example:
|
Doing this will create `.mo` files in `build/src/nvim/po`. Example:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
make CMAKE_EXTRA_FLAGS="-DENABLE_TRANSLATIONS=ON"
|
make CMAKE_EXTRA_FLAGS="-DENABLE_TRANSLATIONS=ON"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -228,7 +231,7 @@ make CMAKE_EXTRA_FLAGS="-DENABLE_TRANSLATIONS=ON"
|
|||||||
|
|
||||||
To check the translations for `$LANG`, run `make -C build check-po-$LANG`. Examples:
|
To check the translations for `$LANG`, run `make -C build check-po-$LANG`. Examples:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cmake --build build --target check-po-de
|
cmake --build build --target check-po-de
|
||||||
cmake --build build --target check-po-pt_BR
|
cmake --build build --target check-po-pt_BR
|
||||||
```
|
```
|
||||||
@@ -239,7 +242,7 @@ cmake --build build --target check-po-pt_BR
|
|||||||
|
|
||||||
To update the `src/nvim/po/$LANG.po` file with the latest strings, run the following:
|
To update the `src/nvim/po/$LANG.po` file with the latest strings, run the following:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cmake --build build --target update-po-$LANG
|
cmake --build build --target update-po-$LANG
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -249,7 +252,7 @@ cmake --build build --target update-po-$LANG
|
|||||||
|
|
||||||
To see the chain of includes, use the `-H` option ([#918](https://github.com/neovim/neovim/issues/918)):
|
To see the chain of includes, use the `-H` option ([#918](https://github.com/neovim/neovim/issues/918)):
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
echo '#include "./src/nvim/buffer.h"' | \
|
echo '#include "./src/nvim/buffer.h"' | \
|
||||||
> clang -I.deps/usr/include -Isrc -std=c99 -P -E -H - 2>&1 >/dev/null | \
|
> clang -I.deps/usr/include -Isrc -std=c99 -P -E -H - 2>&1 >/dev/null | \
|
||||||
> grep -v /usr/
|
> grep -v /usr/
|
||||||
@@ -278,14 +281,14 @@ Reference the [Debian package](https://packages.debian.org/sid/source/neovim) (o
|
|||||||
|
|
||||||
To build the bundled dependencies using CMake:
|
To build the bundled dependencies using CMake:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
```
|
```
|
||||||
|
|
||||||
By default the libraries and headers are placed in `.deps/usr`. Now you can build Neovim:
|
By default the libraries and headers are placed in `.deps/usr`. Now you can build Neovim:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
cmake --build build
|
cmake --build build
|
||||||
```
|
```
|
||||||
@@ -295,12 +298,12 @@ cmake --build build
|
|||||||
1. Manually install the dependencies:
|
1. Manually install the dependencies:
|
||||||
- libuv libluv libutf8proc luajit lua-lpeg tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
|
- libuv libluv libutf8proc luajit lua-lpeg tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
|
||||||
2. Run CMake:
|
2. Run CMake:
|
||||||
```sh
|
```bash
|
||||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
cmake --build build
|
cmake --build build
|
||||||
```
|
```
|
||||||
If all the dependencies are not available in the package, you can use only some of the bundled dependencies as follows (example of using `ninja`):
|
If all the dependencies are not available in the package, you can use only some of the bundled dependencies as follows (example of using `ninja`):
|
||||||
```sh
|
```bash
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS=ON
|
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_TS=ON
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
@@ -322,7 +325,7 @@ to build *with* bundled dependencies. This is supported as follows.
|
|||||||
- Run `make deps` to generate `.deps/`, then clean it up using [these commands](https://github.com/neovim/neovim/blob/1c12073db6c64eb365748f153f96be9b0fe61070/.github/workflows/build.yml#L67-L74).
|
- Run `make deps` to generate `.deps/`, then clean it up using [these commands](https://github.com/neovim/neovim/blob/1c12073db6c64eb365748f153f96be9b0fe61070/.github/workflows/build.yml#L67-L74).
|
||||||
2. Copy the prepared `.deps` to the isolated machine (without network access).
|
2. Copy the prepared `.deps` to the isolated machine (without network access).
|
||||||
3. Build with `USE_EXISTING_SRC_DIR` enabled, on the isolated machine:
|
3. Build with `USE_EXISTING_SRC_DIR` enabled, on the isolated machine:
|
||||||
```
|
```bash
|
||||||
make deps DEPS_CMAKE_FLAGS=-DUSE_EXISTING_SRC_DIR=ON
|
make deps DEPS_CMAKE_FLAGS=-DUSE_EXISTING_SRC_DIR=ON
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
@@ -335,7 +338,7 @@ runtime, and can be disabled if the internal definitions for common terminals
|
|||||||
are good enough. To avoid this dependency, build with support for loading
|
are good enough. To avoid this dependency, build with support for loading
|
||||||
custom terminfo at runtime, use
|
custom terminfo at runtime, use
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
make CMAKE_EXTRA_FLAGS="-DENABLE_UNIBILIUM=0" DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_UNIBILIUM=0"
|
make CMAKE_EXTRA_FLAGS="-DENABLE_UNIBILIUM=0" DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_UNIBILIUM=0"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -345,7 +348,7 @@ To confirm at runtime that unibilium was not included, check `has('terminfo') ==
|
|||||||
|
|
||||||
Example of building with specific bundled and non-bundled dependencies:
|
Example of building with specific bundled and non-bundled dependencies:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
make DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_TS=ON -DUSE_BUNDLED_LIBUV=ON"
|
make DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_TS=ON -DUSE_BUNDLED_LIBUV=ON"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -356,7 +359,7 @@ make DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_TS=O
|
|||||||
|
|
||||||
In case you are not using Alpine Linux you can use a container to do the build the binary:
|
In case you are not using Alpine Linux you can use a container to do the build the binary:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
podman run \
|
podman run \
|
||||||
--rm \
|
--rm \
|
||||||
-it \
|
-it \
|
||||||
@@ -385,37 +388,37 @@ Platform-specific requirements are listed below.
|
|||||||
|
|
||||||
### Ubuntu / Debian
|
### Ubuntu / Debian
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo apt-get install ninja-build gettext cmake curl build-essential git
|
sudo apt-get install ninja-build gettext cmake curl build-essential git
|
||||||
```
|
```
|
||||||
|
|
||||||
### RHEL / Fedora
|
### RHEL / Fedora
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo dnf -y install ninja-build cmake gcc make gettext curl glibc-gconv-extra git
|
sudo dnf -y install ninja-build cmake gcc make gettext curl glibc-gconv-extra git
|
||||||
```
|
```
|
||||||
|
|
||||||
### openSUSE
|
### openSUSE
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo zypper install ninja cmake gcc-c++ gettext-tools curl git
|
sudo zypper install ninja cmake gcc-c++ gettext-tools curl git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Arch Linux
|
### Arch Linux
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo pacman -S base-devel cmake ninja curl git
|
sudo pacman -S base-devel cmake ninja curl git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Alpine Linux
|
### Alpine Linux
|
||||||
|
|
||||||
```
|
```bash
|
||||||
apk add build-base cmake coreutils curl gettext-tiny-dev git
|
apk add build-base cmake coreutils curl gettext-tiny-dev git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Void Linux
|
### Void Linux
|
||||||
|
|
||||||
```
|
```bash
|
||||||
xbps-install base-devel cmake curl git
|
xbps-install base-devel cmake curl git
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -423,25 +426,25 @@ xbps-install base-devel cmake curl git
|
|||||||
|
|
||||||
Starting from NixOS 18.03, the Neovim binary resides in the `neovim-unwrapped` Nix package (the `neovim` package being just a wrapper to setup runtime options like Ruby/Python support):
|
Starting from NixOS 18.03, the Neovim binary resides in the `neovim-unwrapped` Nix package (the `neovim` package being just a wrapper to setup runtime options like Ruby/Python support):
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
cd path/to/neovim/src
|
cd path/to/neovim/src
|
||||||
```
|
```
|
||||||
|
|
||||||
Drop into `nix-shell` to pull in the Neovim dependencies:
|
Drop into `nix-shell` to pull in the Neovim dependencies:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
nix-shell '<nixpkgs>' -A neovim-unwrapped
|
nix-shell '<nixpkgs>' -A neovim-unwrapped
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure and build:
|
Configure and build:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
rm -rf build && cmakeConfigurePhase
|
rm -rf build && cmakeConfigurePhase
|
||||||
buildPhase
|
buildPhase
|
||||||
```
|
```
|
||||||
|
|
||||||
Tests are not available by default, because of some unfixed failures. You can enable them via adding this package in your overlay:
|
Tests are not available by default, because of some unfixed failures. You can enable them via adding this package in your overlay:
|
||||||
```
|
```nix
|
||||||
neovim-dev = (super.pkgs.neovim-unwrapped.override {
|
neovim-dev = (super.pkgs.neovim-unwrapped.override {
|
||||||
doCheck=true;
|
doCheck=true;
|
||||||
}).overrideAttrs(oa:{
|
}).overrideAttrs(oa:{
|
||||||
@@ -456,7 +459,7 @@ Tests are not available by default, because of some unfixed failures. You can en
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
and replacing `neovim-unwrapped` with `neovim-dev`:
|
and replacing `neovim-unwrapped` with `neovim-dev`:
|
||||||
```
|
```bash
|
||||||
nix-shell '<nixpkgs>' -A neovim-dev
|
nix-shell '<nixpkgs>' -A neovim-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -474,13 +477,14 @@ or a specific SHA1 like `--override-input neovim-src github:neovim/neovim/89dc8f
|
|||||||
### Haiku
|
### Haiku
|
||||||
|
|
||||||
Some deps can be pulled from haiku repos, the rest need "bundled" deps:
|
Some deps can be pulled from haiku repos, the rest need "bundled" deps:
|
||||||
|
```bash
|
||||||
cmake -DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_UNIBILIUM=OFF -DUSE_BUNDLED_LUAJIT=OFF -B .deps ./cmake.deps
|
cmake -DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_UNIBILIUM=OFF -DUSE_BUNDLED_LUAJIT=OFF -B .deps ./cmake.deps
|
||||||
make -C .deps
|
make -C .deps
|
||||||
|
```
|
||||||
|
|
||||||
### FreeBSD
|
### FreeBSD
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo pkg install cmake gmake sha wget gettext curl git
|
sudo pkg install cmake gmake sha wget gettext curl git
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -488,13 +492,13 @@ If you get an error regarding a `sha256sum` mismatch, where the actual SHA-256 h
|
|||||||
|
|
||||||
### OpenBSD
|
### OpenBSD
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
doas pkg_add gmake cmake curl gettext-tools git ninja
|
doas pkg_add gmake cmake curl gettext-tools git ninja
|
||||||
```
|
```
|
||||||
|
|
||||||
While `ninja` is technically optional, the build is likely to fail without it. This is because `cmake` will use `make` in that case, and the bundled LuaJIT requires `gmake`. Instead of installing `ninja`, you could work around this by installing `luajit` and disabling the bundled LuaJIT:
|
While `ninja` is technically optional, the build is likely to fail without it. This is because `cmake` will use `make` in that case, and the bundled LuaJIT requires `gmake`. Instead of installing `ninja`, you could work around this by installing `luajit` and disabling the bundled LuaJIT:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
gmake DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUAJIT=0"
|
gmake DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LUAJIT=0"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -507,16 +511,16 @@ Another workaround is to edit `cmake/Deps.cmake` and comment out the line `set(M
|
|||||||
1. Install Xcode Command Line Tools: `xcode-select --install`
|
1. Install Xcode Command Line Tools: `xcode-select --install`
|
||||||
2. Install [Homebrew](http://brew.sh)
|
2. Install [Homebrew](http://brew.sh)
|
||||||
3. Install Neovim build dependencies:
|
3. Install Neovim build dependencies:
|
||||||
```
|
```bash
|
||||||
brew install ninja cmake gettext curl git
|
brew install ninja cmake gettext curl git
|
||||||
```
|
```
|
||||||
- **Note**: If you see Wget certificate errors (for older macOS versions less than 10.10):
|
- **Note**: If you see Wget certificate errors (for older macOS versions less than 10.10):
|
||||||
```sh
|
```bash
|
||||||
brew install curl-ca-bundle
|
brew install curl-ca-bundle
|
||||||
echo CA_CERTIFICATE=$(brew --prefix curl-ca-bundle)/share/ca-bundle.crt >> ~/.wgetrc
|
echo CA_CERTIFICATE=$(brew --prefix curl-ca-bundle)/share/ca-bundle.crt >> ~/.wgetrc
|
||||||
```
|
```
|
||||||
- **Note**: If you see `'stdio.h' file not found`, try the following:
|
- **Note**: If you see `'stdio.h' file not found`, try the following:
|
||||||
```
|
```bash
|
||||||
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -525,16 +529,16 @@ Another workaround is to edit `cmake/Deps.cmake` and comment out the line `set(M
|
|||||||
1. Install Xcode Command Line Tools: `xcode-select --install`
|
1. Install Xcode Command Line Tools: `xcode-select --install`
|
||||||
2. Install [MacPorts](http://www.macports.org)
|
2. Install [MacPorts](http://www.macports.org)
|
||||||
3. Install Neovim build dependencies:
|
3. Install Neovim build dependencies:
|
||||||
```
|
```bash
|
||||||
sudo port install ninja cmake gettext git
|
sudo port install ninja cmake gettext git
|
||||||
```
|
```
|
||||||
- **Note**: If you see Wget certificate errors (for older macOS versions less than 10.10):
|
- **Note**: If you see Wget certificate errors (for older macOS versions less than 10.10):
|
||||||
```sh
|
```bash
|
||||||
sudo port install curl-ca-bundle
|
sudo port install curl-ca-bundle
|
||||||
echo CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc
|
echo CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt >> ~/.wgetrc
|
||||||
```
|
```
|
||||||
- **Note**: If you see `'stdio.h' file not found`, try the following:
|
- **Note**: If you see `'stdio.h' file not found`, try the following:
|
||||||
```
|
```bash
|
||||||
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -549,8 +553,10 @@ make CMAKE_BUILD_TYPE=Release MACOSX_DEPLOYMENT_TARGET=10.13 DEPS_CMAKE_FLAGS="-
|
|||||||
Note that the C++ compiler is explicitly set so that it can be found when the deployment target is set.
|
Note that the C++ compiler is explicitly set so that it can be found when the deployment target is set.
|
||||||
|
|
||||||
## Building with zig
|
## Building with zig
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
- zig 0.15.2
|
- zig 0.15.2
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
- Build the editor: `zig build`, run it with `./zig-out/bin/nvim`
|
- Build the editor: `zig build`, run it with `./zig-out/bin/nvim`
|
||||||
- Complete installation with runtime: `zig build install --prefix ~/.local`
|
- Complete installation with runtime: `zig build install --prefix ~/.local`
|
||||||
@@ -558,8 +564,10 @@ Note that the C++ compiler is explicitly set so that it can be found when the de
|
|||||||
+ `zig build functionaltest` to run all functionaltests
|
+ `zig build functionaltest` to run all functionaltests
|
||||||
+ `zig build functionaltest -- test/functional/autocmd/bufenter_spec.lua` to run the tests in one file
|
+ `zig build functionaltest -- test/functional/autocmd/bufenter_spec.lua` to run the tests in one file
|
||||||
+ `zig build unittest` to run all unittests
|
+ `zig build unittest` to run all unittests
|
||||||
|
|
||||||
#### Using system dependencies
|
#### Using system dependencies
|
||||||
See "Available System Integrations" in `zig build -h` to see available system integrations. Enabling an integration, e.g. `zig build -fsys=utf8proc` will use the system's installation of utf8proc.
|
|
||||||
|
See "Available System Integrations" in `zig build -h` to see available system integrations. Enabling an integration, e.g. `zig build -fsys=utf8proc` will use the system's installation of utf8proc.
|
||||||
|
|
||||||
`zig build --system deps_dir` will enable all integrations and turn off dependency fetching. This requires you to pre-download the dependencies which don't have a system integration into `deps_dir` (at the time of writing these are ziglua, [`lua_dev_deps`](https://github.com/neovim/deps/blob/master/opt/lua-dev-deps.tar.gz), and the built-in tree-sitter parsers). You have to create subdirectories whose names are the respective package's hash under `deps_dir` and unpack the dependencies inside that directory - ziglua should go under `deps_dir/zlua-0.1.0-hGRpC1dCBQDf-IqqUifYvyr8B9-4FlYXqY8cl7HIetrC` and so on. Hashes should be taken from `build.zig.zon`.
|
`zig build --system deps_dir` will enable all integrations and turn off dependency fetching. This requires you to pre-download the dependencies which don't have a system integration into `deps_dir` (at the time of writing these are ziglua, [`lua_dev_deps`](https://github.com/neovim/deps/blob/master/opt/lua-dev-deps.tar.gz), and the built-in tree-sitter parsers). You have to create subdirectories whose names are the respective package's hash under `deps_dir` and unpack the dependencies inside that directory - ziglua should go under `deps_dir/zlua-0.1.0-hGRpC1dCBQDf-IqqUifYvyr8B9-4FlYXqY8cl7HIetrC` and so on. Hashes should be taken from `build.zig.zon`.
|
||||||
|
|
||||||
|
|||||||
304
INSTALL.md
304
INSTALL.md
@@ -42,7 +42,7 @@ Windows 8+ is required. Windows 7 or older is not supported.
|
|||||||
- **Development (pre-release):** `choco install neovim --pre`
|
- **Development (pre-release):** `choco install neovim --pre`
|
||||||
|
|
||||||
### [Scoop](https://scoop.sh/)
|
### [Scoop](https://scoop.sh/)
|
||||||
```
|
```bash
|
||||||
scoop bucket add main
|
scoop bucket add main
|
||||||
scoop install neovim
|
scoop install neovim
|
||||||
```
|
```
|
||||||
@@ -69,7 +69,7 @@ Several Neovim GUIs are available from scoop (extras): [scoop.sh/#/apps?q=neovim
|
|||||||
- For Python plugins you need the `pynvim` module. Installation via uv
|
- For Python plugins you need the `pynvim` module. Installation via uv
|
||||||
(https://docs.astral.sh/uv/) is recommended; the `--upgrade` switch ensures
|
(https://docs.astral.sh/uv/) is recommended; the `--upgrade` switch ensures
|
||||||
installation of the latest version:
|
installation of the latest version:
|
||||||
```
|
```bash
|
||||||
uv tool install --upgrade pynvim
|
uv tool install --upgrade pynvim
|
||||||
```
|
```
|
||||||
- Run `:checkhealth` and read `:help provider-python` for more details.
|
- Run `:checkhealth` and read `:help provider-python` for more details.
|
||||||
@@ -83,25 +83,29 @@ Several Neovim GUIs are available from scoop (extras): [scoop.sh/#/apps?q=neovim
|
|||||||
The [Releases](https://github.com/neovim/neovim/releases) page provides pre-built binaries for macOS 10.15+.
|
The [Releases](https://github.com/neovim/neovim/releases) page provides pre-built binaries for macOS 10.15+.
|
||||||
|
|
||||||
For x86_64:
|
For x86_64:
|
||||||
|
```bash
|
||||||
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz
|
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz
|
||||||
tar xzf nvim-macos-x86_64.tar.gz
|
tar xzf nvim-macos-x86_64.tar.gz
|
||||||
./nvim-macos-x86_64/bin/nvim
|
./nvim-macos-x86_64/bin/nvim
|
||||||
|
```
|
||||||
For arm64:
|
For arm64:
|
||||||
|
```bash
|
||||||
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-arm64.tar.gz
|
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-arm64.tar.gz
|
||||||
tar xzf nvim-macos-arm64.tar.gz
|
tar xzf nvim-macos-arm64.tar.gz
|
||||||
./nvim-macos-arm64/bin/nvim
|
./nvim-macos-arm64/bin/nvim
|
||||||
|
```
|
||||||
### [Homebrew](https://brew.sh) on macOS or Linux
|
### [Homebrew](https://brew.sh) on macOS or Linux
|
||||||
|
|
||||||
brew install neovim
|
```bash
|
||||||
|
brew install neovim
|
||||||
|
```
|
||||||
|
|
||||||
### [MacPorts](https://www.macports.org/)
|
### [MacPorts](https://www.macports.org/)
|
||||||
|
|
||||||
sudo port selfupdate
|
```bash
|
||||||
sudo port install neovim
|
sudo port selfupdate
|
||||||
|
sudo port install neovim
|
||||||
|
```
|
||||||
|
|
||||||
## Linux
|
## Linux
|
||||||
|
|
||||||
@@ -109,35 +113,40 @@ For arm64:
|
|||||||
|
|
||||||
The [Releases](https://github.com/neovim/neovim/releases) page provides pre-built binaries for Linux systems.
|
The [Releases](https://github.com/neovim/neovim/releases) page provides pre-built binaries for Linux systems.
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
||||||
sudo rm -rf /opt/nvim-linux-x86_64
|
sudo rm -rf /opt/nvim-linux-x86_64
|
||||||
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
|
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
Then add this to your shell config (`~/.bashrc`, `~/.zshrc`, ...):
|
Then add this to your shell config (`~/.bashrc`, `~/.zshrc`, ...):
|
||||||
|
```bash
|
||||||
export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
|
export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
|
||||||
|
```
|
||||||
|
|
||||||
### AppImage ("universal" Linux package)
|
### AppImage ("universal" Linux package)
|
||||||
|
|
||||||
The [Releases](https://github.com/neovim/neovim/releases) page provides an [AppImage](https://appimage.org) that runs on most Linux systems. No installation is needed, just download `nvim-linux-x86_64.appimage` and run it. (It might not work if your Linux distribution is more than 4 years old.) The following instructions assume an `x86_64` architecture; on ARM Linux replace with `arm64`.
|
The [Releases](https://github.com/neovim/neovim/releases) page provides an [AppImage](https://appimage.org) that runs on most Linux systems. No installation is needed, just download `nvim-linux-x86_64.appimage` and run it. (It might not work if your Linux distribution is more than 4 years old.) The following instructions assume an `x86_64` architecture; on ARM Linux replace with `arm64`.
|
||||||
|
|
||||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.appimage
|
```bash
|
||||||
chmod u+x nvim-linux-x86_64.appimage
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.appimage
|
||||||
./nvim-linux-x86_64.appimage
|
chmod u+x nvim-linux-x86_64.appimage
|
||||||
|
./nvim-linux-x86_64.appimage
|
||||||
|
```
|
||||||
|
|
||||||
To expose nvim globally:
|
To expose nvim globally:
|
||||||
|
```bash
|
||||||
mkdir -p /opt/nvim
|
mkdir -p /opt/nvim
|
||||||
mv nvim-linux-x86_64.appimage /opt/nvim/nvim
|
mv nvim-linux-x86_64.appimage /opt/nvim/nvim
|
||||||
|
```
|
||||||
|
|
||||||
And the following line to your shell config (`~/.bashrc`, `~/.zshrc`, ...):
|
And the following line to your shell config (`~/.bashrc`, `~/.zshrc`, ...):
|
||||||
|
```bash
|
||||||
export PATH="$PATH:/opt/nvim/"
|
export PATH="$PATH:/opt/nvim/"
|
||||||
|
```
|
||||||
|
|
||||||
If the `./nvim-linux-x86_64.appimage` command fails, try:
|
If the `./nvim-linux-x86_64.appimage` command fails, try:
|
||||||
```sh
|
```bash
|
||||||
./nvim-linux-x86_64.appimage --appimage-extract
|
./nvim-linux-x86_64.appimage --appimage-extract
|
||||||
./squashfs-root/AppRun --version
|
./squashfs-root/AppRun --version
|
||||||
|
|
||||||
@@ -150,71 +159,78 @@ nvim
|
|||||||
### Arch Linux
|
### Arch Linux
|
||||||
|
|
||||||
Neovim can be installed from the community repository:
|
Neovim can be installed from the community repository:
|
||||||
|
```bash
|
||||||
sudo pacman -S neovim
|
sudo pacman -S neovim
|
||||||
|
```
|
||||||
Alternatively, Neovim can be also installed using the PKGBUILD [`neovim-git`](https://aur.archlinux.org/packages/neovim-git), available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).
|
Alternatively, Neovim can be also installed using the PKGBUILD [`neovim-git`](https://aur.archlinux.org/packages/neovim-git), available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).
|
||||||
|
|
||||||
Alternatively, Neovim Nightly builds can be also installed using the PKGBUILD [`neovim-nightly-bin`](https://aur.archlinux.org/packages/neovim-nightly-bin), available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).
|
Alternatively, Neovim Nightly builds can be also installed using the PKGBUILD [`neovim-nightly-bin`](https://aur.archlinux.org/packages/neovim-nightly-bin), available on the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).
|
||||||
|
|
||||||
The Python module is available from the community repository:
|
The Python module is available from the community repository:
|
||||||
|
```bash
|
||||||
sudo pacman -S python-pynvim
|
sudo pacman -S python-pynvim
|
||||||
|
```
|
||||||
Ruby modules (currently only supported in `neovim-git`) are available from the AUR as [`ruby-neovim`](https://aur.archlinux.org/packages/ruby-neovim).
|
Ruby modules (currently only supported in `neovim-git`) are available from the AUR as [`ruby-neovim`](https://aur.archlinux.org/packages/ruby-neovim).
|
||||||
|
|
||||||
### CentOS 8 / RHEL 8
|
### CentOS 8 / RHEL 8
|
||||||
|
|
||||||
Neovim is available through [EPEL (Extra Packages for Enterprise Linux)](https://fedoraproject.org/wiki/EPEL)
|
Neovim is available through [EPEL (Extra Packages for Enterprise Linux)](https://fedoraproject.org/wiki/EPEL)
|
||||||
|
```bash
|
||||||
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||||
yum install -y neovim python3-neovim
|
yum install -y neovim python3-neovim
|
||||||
|
```
|
||||||
### Clear Linux OS
|
### Clear Linux OS
|
||||||
|
|
||||||
Neovim is available through the [neovim bundle](https://github.com/clearlinux/clr-bundles/blob/master/bundles/neovim)
|
Neovim is available through the [neovim bundle](https://github.com/clearlinux/clr-bundles/blob/master/bundles/neovim)
|
||||||
|
```bash
|
||||||
sudo swupd bundle-add neovim
|
sudo swupd bundle-add neovim
|
||||||
|
```
|
||||||
|
|
||||||
Python (`:python`) support is available if the [python-basic bundle](https://github.com/clearlinux/clr-bundles/blob/master/bundles/python-basic) is installed.
|
Python (`:python`) support is available if the [python-basic bundle](https://github.com/clearlinux/clr-bundles/blob/master/bundles/python-basic) is installed.
|
||||||
|
```bash
|
||||||
sudo swupd bundle-add python-basic
|
sudo swupd bundle-add python-basic
|
||||||
|
```
|
||||||
|
|
||||||
### Debian
|
### Debian
|
||||||
|
|
||||||
Neovim is in [Debian](https://packages.debian.org/search?keywords=neovim).
|
Neovim is in [Debian](https://packages.debian.org/search?keywords=neovim).
|
||||||
|
```bash
|
||||||
sudo apt-get install neovim
|
sudo apt-get install neovim
|
||||||
|
```
|
||||||
|
|
||||||
Python (`:python`) support is installable via the package manager on Debian unstable.
|
Python (`:python`) support is installable via the package manager on Debian unstable.
|
||||||
|
```bash
|
||||||
sudo apt-get install python3-neovim
|
sudo apt-get install python3-neovim
|
||||||
|
```
|
||||||
### Exherbo Linux
|
### Exherbo Linux
|
||||||
|
|
||||||
Exhereses for scm and released versions are currently available in repository `::medvid`. Python client (with GTK+ GUI included) and Qt5 GUI are also available as suggestions:
|
Exhereses for scm and released versions are currently available in repository `::medvid`. Python client (with GTK+ GUI included) and Qt5 GUI are also available as suggestions:
|
||||||
|
```bash
|
||||||
cave resolve app-editors/neovim --take dev-python/neovim-python --take app-editors/neovim-qt
|
cave resolve app-editors/neovim --take dev-python/neovim-python --take app-editors/neovim-qt
|
||||||
|
```
|
||||||
|
|
||||||
### Fedora
|
### Fedora
|
||||||
|
|
||||||
Neovim is in [Fedora](https://src.fedoraproject.org/rpms/neovim) starting with Fedora 25:
|
Neovim is in [Fedora](https://src.fedoraproject.org/rpms/neovim) starting with Fedora 25:
|
||||||
|
```bash
|
||||||
sudo dnf install -y neovim python3-neovim
|
sudo dnf install -y neovim python3-neovim
|
||||||
|
```
|
||||||
|
|
||||||
You can also get nightly builds of git master from the [Copr automated build system](https://copr.fedoraproject.org/coprs/agriffis/neovim-nightly/):
|
You can also get nightly builds of git master from the [Copr automated build system](https://copr.fedoraproject.org/coprs/agriffis/neovim-nightly/):
|
||||||
|
```bash
|
||||||
dnf copr enable agriffis/neovim-nightly
|
dnf copr enable agriffis/neovim-nightly
|
||||||
dnf install -y neovim python3-neovim
|
dnf install -y neovim python3-neovim
|
||||||
|
```
|
||||||
|
|
||||||
See the [blog post](https://arongriffis.com/2019-03-02-neovim-nightly-builds) for information on how these are built.
|
See the [blog post](https://arongriffis.com/2019-03-02-neovim-nightly-builds) for information on how these are built.
|
||||||
|
|
||||||
### Flatpak
|
### Flatpak
|
||||||
|
|
||||||
You can find Neovim on [Flathub](https://flathub.org/apps/details/io.neovim.nvim). Providing you have Flatpak [set up](https://flatpak.org/setup/):
|
You can find Neovim on [Flathub](https://flathub.org/apps/details/io.neovim.nvim). Providing you have Flatpak [set up](https://flatpak.org/setup/):
|
||||||
|
```bash
|
||||||
flatpak install flathub io.neovim.nvim
|
flatpak install flathub io.neovim.nvim
|
||||||
flatpak run io.neovim.nvim
|
flatpak run io.neovim.nvim
|
||||||
|
```
|
||||||
|
|
||||||
You can add `/var/lib/flatpak/exports/bin` (or `~/.local/share/flatpak/exports/bin` if you used `--user`) to the `$PATH` and run it with `io.neovim.nvim`.
|
You can add `/var/lib/flatpak/exports/bin` (or `~/.local/share/flatpak/exports/bin` if you used `--user`) to the `$PATH` and run it with `io.neovim.nvim`.
|
||||||
|
|
||||||
@@ -223,64 +239,77 @@ Note that Flatpak'ed Neovim will look for `init.vim` in `~/.var/app/io.neovim.nv
|
|||||||
### Gentoo Linux
|
### Gentoo Linux
|
||||||
|
|
||||||
An ebuild is available in Gentoo's official portage repository:
|
An ebuild is available in Gentoo's official portage repository:
|
||||||
|
```bash
|
||||||
emerge -a app-editors/neovim
|
emerge -a app-editors/neovim
|
||||||
|
```
|
||||||
|
|
||||||
### GNU Guix
|
### GNU Guix
|
||||||
|
|
||||||
Neovim can be installed with:
|
Neovim can be installed with:
|
||||||
|
```bash
|
||||||
guix install neovim
|
guix install neovim
|
||||||
|
```
|
||||||
|
|
||||||
### GoboLinux
|
### GoboLinux
|
||||||
|
|
||||||
Neovim can be installed with:
|
Neovim can be installed with:
|
||||||
|
```bash
|
||||||
sudo -H Compile NeoVim
|
sudo -H Compile NeoVim
|
||||||
|
```
|
||||||
|
|
||||||
### Nix / NixOS
|
### Nix / NixOS
|
||||||
|
|
||||||
Neovim can be installed with:
|
Neovim can be installed with:
|
||||||
|
```bash
|
||||||
nix-env -iA nixpkgs.neovim
|
nix-env -iA nixpkgs.neovim
|
||||||
|
```
|
||||||
|
|
||||||
Or alternatively, if you use flakes:
|
Or alternatively, if you use flakes:
|
||||||
|
```bash
|
||||||
nix profile install nixpkgs#neovim
|
nix profile install nixpkgs#neovim
|
||||||
|
```
|
||||||
|
|
||||||
### Mageia 7
|
### Mageia 7
|
||||||
|
|
||||||
urpmi neovim
|
```bash
|
||||||
|
urpmi neovim
|
||||||
|
```
|
||||||
|
|
||||||
To install the Python modules:
|
To install the Python modules:
|
||||||
|
```bash
|
||||||
urpmi python3-pynvim
|
urpmi python3-pynvim
|
||||||
|
```
|
||||||
|
|
||||||
### makedeb Package Repository (MPR)
|
### makedeb Package Repository (MPR)
|
||||||
|
|
||||||
Neovim is available inside the [MPR](https://mpr.makedeb.org/packages/neovim). You can install it with:
|
Neovim is available inside the [MPR](https://mpr.makedeb.org/packages/neovim). You can install it with:
|
||||||
|
|
||||||
git clone https://mpr.makedeb.org/neovim
|
```bash
|
||||||
cd neovim/
|
git clone https://mpr.makedeb.org/neovim
|
||||||
makedeb -si
|
cd neovim/
|
||||||
|
makedeb -si
|
||||||
|
```
|
||||||
|
|
||||||
### OpenSUSE
|
### OpenSUSE
|
||||||
|
|
||||||
Neovim can be installed with:
|
Neovim can be installed with:
|
||||||
|
```bash
|
||||||
sudo zypper in neovim
|
sudo zypper in neovim
|
||||||
|
```
|
||||||
|
|
||||||
To install the Python modules:
|
To install the Python modules:
|
||||||
|
```bash
|
||||||
sudo zypper in python-neovim python3-neovim
|
sudo zypper in python-neovim python3-neovim
|
||||||
|
```
|
||||||
|
|
||||||
### PLD Linux
|
### PLD Linux
|
||||||
|
|
||||||
Neovim is in [PLD Linux](https://github.com/pld-linux/neovim):
|
Neovim is in [PLD Linux](https://github.com/pld-linux/neovim):
|
||||||
|
```bash
|
||||||
poldek -u neovim
|
poldek -u neovim
|
||||||
poldek -u python-neovim python3-neovim
|
poldek -u python-neovim python3-neovim
|
||||||
poldek -u python-neovim-gui python3-neovim-gui
|
poldek -u python-neovim-gui python3-neovim-gui
|
||||||
|
```
|
||||||
|
|
||||||
### Slackware
|
### Slackware
|
||||||
|
|
||||||
@@ -289,14 +318,16 @@ See [neovim on SlackBuilds](https://slackbuilds.org/apps/neovim/).
|
|||||||
### Source Mage
|
### Source Mage
|
||||||
|
|
||||||
Neovim can be installed using the Sorcery package manager:
|
Neovim can be installed using the Sorcery package manager:
|
||||||
|
```bash
|
||||||
cast neovim
|
cast neovim
|
||||||
|
```
|
||||||
|
|
||||||
### Solus
|
### Solus
|
||||||
|
|
||||||
Neovim can be installed using the default package manager in Solus (eopkg):
|
Neovim can be installed using the default package manager in Solus (eopkg):
|
||||||
|
```bash
|
||||||
sudo eopkg install neovim
|
sudo eopkg install neovim
|
||||||
|
```
|
||||||
|
|
||||||
### Snap
|
### Snap
|
||||||
|
|
||||||
@@ -304,24 +335,27 @@ Neovim nightly and stable are available on the [snap store](https://snapcraft.io
|
|||||||
|
|
||||||
**Stable Builds**
|
**Stable Builds**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo snap install nvim --classic
|
sudo snap install nvim --classic
|
||||||
```
|
```
|
||||||
|
|
||||||
**Nightly Builds**
|
**Nightly Builds**
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo snap install --edge nvim --classic
|
sudo snap install --edge nvim --classic
|
||||||
```
|
```
|
||||||
|
|
||||||
### Ubuntu
|
### Ubuntu
|
||||||
As in Debian, Neovim is in [Ubuntu](https://packages.ubuntu.com/search?keywords=neovim).
|
|
||||||
|
|
||||||
sudo apt install neovim
|
As in Debian, Neovim is in [Ubuntu](https://packages.ubuntu.com/search?keywords=neovim).
|
||||||
|
```bash
|
||||||
|
sudo apt install neovim
|
||||||
|
```
|
||||||
|
|
||||||
Python (`:python`) support seems to be automatically installed
|
Python (`:python`) support seems to be automatically installed
|
||||||
|
```bash
|
||||||
sudo apt install python3-neovim
|
sudo apt install python3-neovim
|
||||||
|
```
|
||||||
|
|
||||||
Neovim has been added to a "Personal Package Archive" (PPA). This allows you to install it with `apt-get`. Follow the links to the PPAs to see which versions of Ubuntu are currently available via the PPA. Choose **stable** or **unstable**:
|
Neovim has been added to a "Personal Package Archive" (PPA). This allows you to install it with `apt-get`. Follow the links to the PPAs to see which versions of Ubuntu are currently available via the PPA. Choose **stable** or **unstable**:
|
||||||
|
|
||||||
@@ -331,66 +365,78 @@ Neovim has been added to a "Personal Package Archive" (PPA). This allows you to
|
|||||||
**Important:** The Neovim team does not maintain the PPA packages. For problems or questions about the PPA specifically contact https://launchpad.net/~neovim-ppa.
|
**Important:** The Neovim team does not maintain the PPA packages. For problems or questions about the PPA specifically contact https://launchpad.net/~neovim-ppa.
|
||||||
|
|
||||||
To be able to use **add-apt-repository** you may need to install software-properties-common:
|
To be able to use **add-apt-repository** you may need to install software-properties-common:
|
||||||
|
```bash
|
||||||
sudo apt-get install software-properties-common
|
sudo apt-get install software-properties-common
|
||||||
|
```
|
||||||
|
|
||||||
If you're using an older version Ubuntu you must use:
|
If you're using an older version Ubuntu you must use:
|
||||||
|
```bash
|
||||||
sudo apt-get install python-software-properties
|
sudo apt-get install python-software-properties
|
||||||
|
```
|
||||||
|
|
||||||
Run the following commands:
|
Run the following commands:
|
||||||
|
```bash
|
||||||
sudo add-apt-repository ppa:neovim-ppa/stable
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install neovim
|
sudo apt-get install neovim
|
||||||
|
```
|
||||||
|
|
||||||
Prerequisites for the Python modules:
|
Prerequisites for the Python modules:
|
||||||
|
```bash
|
||||||
sudo apt-get install python-dev python-pip python3-dev python3-pip
|
sudo apt-get install python-dev python-pip python3-dev python3-pip
|
||||||
|
```
|
||||||
|
|
||||||
If you're using an older version Ubuntu you must use:
|
If you're using an older version Ubuntu you must use:
|
||||||
|
```bash
|
||||||
sudo apt-get install python-dev python-pip python3-dev
|
sudo apt-get install python-dev python-pip python3-dev
|
||||||
sudo apt-get install python3-setuptools
|
sudo apt-get install python3-setuptools
|
||||||
sudo easy_install3 pip
|
sudo easy_install3 pip
|
||||||
|
```
|
||||||
|
|
||||||
### Void-Linux
|
### Void-Linux
|
||||||
|
|
||||||
Neovim can be installed using the xbps package manager
|
Neovim can be installed using the xbps package manager
|
||||||
|
```bash
|
||||||
sudo xbps-install -S neovim
|
sudo xbps-install -S neovim
|
||||||
|
```
|
||||||
|
|
||||||
### Alpine Linux
|
### Alpine Linux
|
||||||
|
|
||||||
Neovim can be installed using the apk package manager
|
Neovim can be installed using the apk package manager
|
||||||
|
```bash
|
||||||
sudo apk add neovim
|
sudo apk add neovim
|
||||||
|
```
|
||||||
|
|
||||||
## BSD
|
## BSD
|
||||||
|
|
||||||
### FreeBSD
|
### FreeBSD
|
||||||
|
|
||||||
Neovim can be installed using [`pkg(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1):
|
Neovim can be installed using [`pkg(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1):
|
||||||
|
```bash
|
||||||
pkg install neovim
|
pkg install neovim
|
||||||
|
```
|
||||||
|
|
||||||
or [from the ports tree](https://www.freshports.org/editors/neovim/):
|
or [from the ports tree](https://www.freshports.org/editors/neovim/):
|
||||||
|
```bash
|
||||||
cd /usr/ports/editors/neovim/ && make install clean
|
cd /usr/ports/editors/neovim/ && make install clean
|
||||||
|
```
|
||||||
|
|
||||||
To install the pynvim Python modules using [`pkg(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1) run:
|
To install the pynvim Python modules using [`pkg(8)`](https://www.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&n=1) run:
|
||||||
|
```bash
|
||||||
pkg install py36-pynvim
|
pkg install py36-pynvim
|
||||||
|
```
|
||||||
|
|
||||||
### OpenBSD
|
### OpenBSD
|
||||||
|
|
||||||
Neovim can be installed using [`pkg_add(1)`](https://man.openbsd.org/pkg_add):
|
Neovim can be installed using [`pkg_add(1)`](https://man.openbsd.org/pkg_add):
|
||||||
|
```bash
|
||||||
pkg_add neovim
|
pkg_add neovim
|
||||||
|
```
|
||||||
|
|
||||||
or [from the ports tree](https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/editors/neovim/):
|
or [from the ports tree](https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/editors/neovim/):
|
||||||
|
```bash
|
||||||
cd /usr/ports/editors/neovim/ && make install
|
cd /usr/ports/editors/neovim/ && make install
|
||||||
|
```
|
||||||
|
|
||||||
## Android
|
## Android
|
||||||
|
|
||||||
@@ -401,28 +447,30 @@ Install from source
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
If a package is not provided for your platform, you can build Neovim from source. See [BUILD.md](./BUILD.md) for details. If you have the [prerequisites](./BUILD.md#build-prerequisites) then building is easy:
|
If a package is not provided for your platform, you can build Neovim from source. See [BUILD.md](./BUILD.md) for details. If you have the [prerequisites](./BUILD.md#build-prerequisites) then building is easy:
|
||||||
|
```bash
|
||||||
make CMAKE_BUILD_TYPE=Release
|
make CMAKE_BUILD_TYPE=Release
|
||||||
sudo make install
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
For Unix-like systems this installs Neovim to `/usr/local`, while for Windows to `C:\Program Files`. Note, however, that this can complicate uninstallation. The following example avoids this by isolating an installation under `$HOME/neovim`:
|
For Unix-like systems this installs Neovim to `/usr/local`, while for Windows to `C:\Program Files`. Note, however, that this can complicate uninstallation. The following example avoids this by isolating an installation under `$HOME/neovim`:
|
||||||
|
```bash
|
||||||
rm -r build/ # clear the CMake cache
|
rm -r build/ # clear the CMake cache
|
||||||
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/neovim"
|
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/neovim"
|
||||||
make install
|
make install
|
||||||
export PATH="$HOME/neovim/bin:$PATH"
|
export PATH="$HOME/neovim/bin:$PATH"
|
||||||
|
```
|
||||||
|
|
||||||
## Uninstall
|
## Uninstall
|
||||||
|
|
||||||
There is a CMake target to _uninstall_ after `make install`:
|
There is a CMake target to _uninstall_ after `make install`:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo cmake --build build/ --target uninstall
|
sudo cmake --build build/ --target uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, just delete the `CMAKE_INSTALL_PREFIX` artifacts:
|
Alternatively, just delete the `CMAKE_INSTALL_PREFIX` artifacts:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
sudo rm /usr/local/bin/nvim
|
sudo rm /usr/local/bin/nvim
|
||||||
sudo rm -r /usr/local/share/nvim/
|
sudo rm -r /usr/local/share/nvim/
|
||||||
```
|
```
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -50,14 +50,16 @@ See [BUILD.md](./BUILD.md) and [supported platforms](https://neovim.io/doc/user/
|
|||||||
|
|
||||||
The build is CMake-based, but a Makefile is provided as a convenience.
|
The build is CMake-based, but a Makefile is provided as a convenience.
|
||||||
After installing the dependencies, run the following command.
|
After installing the dependencies, run the following command.
|
||||||
|
```bash
|
||||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
sudo make install
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
To install to a non-default location:
|
To install to a non-default location:
|
||||||
|
```bash
|
||||||
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/full/path/
|
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/full/path/
|
||||||
make install
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
CMake hints for inspecting the build:
|
CMake hints for inspecting the build:
|
||||||
|
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ DEFAULTS
|
|||||||
• Mappings:
|
• Mappings:
|
||||||
• |grt| in Normal mode maps to |vim.lsp.buf.type_definition()|
|
• |grt| in Normal mode maps to |vim.lsp.buf.type_definition()|
|
||||||
• 'shada' default now excludes "/tmp/" and "/private/" paths to reduce clutter in |:oldfiles|.
|
• 'shada' default now excludes "/tmp/" and "/private/" paths to reduce clutter in |:oldfiles|.
|
||||||
|
• Enabled treesitter highlighting for Markdown files
|
||||||
|
|
||||||
DIAGNOSTICS
|
DIAGNOSTICS
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
vim.treesitter.start()
|
||||||
|
|
||||||
vim.keymap.set('n', 'gO', function()
|
vim.keymap.set('n', 'gO', function()
|
||||||
require('vim.treesitter._headings').show_toc()
|
require('vim.treesitter._headings').show_toc()
|
||||||
end, { buffer = 0, silent = true, desc = 'Show an Outline of the current buffer' })
|
end, { buffer = 0, silent = true, desc = 'Show an Outline of the current buffer' })
|
||||||
|
|||||||
Reference in New Issue
Block a user