Skip to content

Commit

Permalink
feat(install)!: Support source and system installed Neovim (#93)
Browse files Browse the repository at this point in the history
* feat(install)!: Support source and system installed Neovim
* chore(build): auto-generate vimdoc
---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
amitds1997 and github-actions[bot] committed Apr 25, 2024
1 parent fac9036 commit c4455b5
Show file tree
Hide file tree
Showing 11 changed files with 434 additions and 113 deletions.
69 changes: 61 additions & 8 deletions .github/workflows/installation_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,71 @@ concurrency:
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
install_test:
name: Test Neovim install
install_linux:
name: Test official release install on Linux
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
runs-on: ${{ matrix.os }}-latest
install_method: [binary, source]
neovim_version: [stable, nightly, v0.9.0]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Neovim (stable) on ${{ matrix.os }}
- uses: actions/checkout@v4
- name: Install build pre-requisites
run: |
sudo apt-get install -y ninja-build gettext \
cmake unzip curl build-essential
- name: Install Neovim
shell: bash
run: |-
chmod +x ./scripts/neovim_install.sh ./scripts/neovim_download.sh
./scripts/neovim_install.sh -v stable -d ~/.remote-nvim
~/.remote-nvim/nvim-downloads/stable/bin/nvim -v
./scripts/neovim_install.sh -v ${{ matrix.neovim_version }} \
-d ~/.remote-nvim \
-m ${{ matrix.install_method }} -a x86_64
~/.remote-nvim/nvim-downloads/${{ matrix.neovim_version }}/bin/nvim -v
install_macos:
name: Test official release install on macOS
strategy:
fail-fast: false
matrix:
config:
- {instance: macos-latest, arch: x86_64}
- {instance: macos-14, arch: arm64}
install_method: [binary, source]
neovim_version: [stable, nightly, v0.9.0]
runs-on: ${{ matrix.config.instance }}
steps:
- uses: actions/checkout@v4
- name: Install Neovim
shell: bash
run: |-
chmod +x ./scripts/neovim_install.sh ./scripts/neovim_download.sh
./scripts/neovim_install.sh -v ${{ matrix.neovim_version }} \
-d ~/.remote-nvim \
-m ${{ matrix.install_method }} -a ${{ matrix.config.arch }}
~/.remote-nvim/nvim-downloads/${{ matrix.neovim_version }}/bin/nvim -v
symlink_test:
name: Test symlink to system Neovim works
strategy:
fail-fast: false
matrix:
config:
- {instance: ubuntu-latest, arch: x86_64}
- {instance: macos-latest, arch: x86_64}
- {instance: macos-14, arch: arm64}
neovim_version: [stable, nightly, v0.9.0]
runs-on: ${{ matrix.config.instance }}
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
name: Install Neovim
with:
neovim: true
version: ${{ matrix.neovim_version }}
- name: Symlink Neovim to system neovim install
shell: bash
run: |-
chmod +x ./scripts/neovim_install.sh ./scripts/neovim_download.sh
./scripts/neovim_install.sh -v system -d ~/.remote-nvim -m system \
-a ${{ matrix.config.arch }}
~/.remote-nvim/nvim-downloads/system/bin/nvim -v
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_install_hook_types: [pre-commit]
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-json
- id: check-toml
Expand All @@ -17,35 +17,35 @@ repos:
- id: pretty-format-json
args: [--autofix]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-1
rev: v3.8.0-1
hooks:
- id: shfmt # native (requires/installs Go to build)
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
rev: v0.10.0
hooks:
- id: shellcheck
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.36.0
rev: v0.39.0
hooks:
- id: markdownlint-fix
exclude: CHANGELOG.md
- id: markdownlint
exclude: CHANGELOG.md
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v0.18.2
rev: v0.20.0
hooks:
- id: stylua
- repo: https://github.com/lyz-code/yamlfix/
rev: 1.13.0
rev: 1.16.0
hooks:
- id: yamlfix
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict]
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.9.0
rev: v3.24.0
hooks:
- id: commitizen
- repo: https://github.com/amitds1997/selene
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ you have an alternative though, I would be happy to integrate it into the plugin

- **Offline mode** - If the remote does not have access to GitHub, Neovim release can be locally
downloaded and then transferred to the remote. For more details, see [Offline mode](#-offline-mode).
- **Building from source/Use globally installed Neovim** - If Neovim is not available for your OS/Arch, you can
build it from source and/or symlink to the globally available Neovim.

### Planned features

Expand All @@ -52,7 +54,7 @@ you have an alternative though, I would be happy to integrate it into the plugin

| Support level | OS |
| --------------------------------- | ----------------------------------------------------------------------- |
|**Supported** | Linux, MacOS |
|**Supported** | Linux, MacOS, FreeBSD (using build from source and/or globally available Neovim)|
| 🚧 **In progress** | FreeBSD ([#71](https://github.com/amitds1997/remote-nvim.nvim/pull/71)) |
| 🟡 **Planned but not implemented** | Windows, WSL |

Expand Down Expand Up @@ -357,12 +359,14 @@ you have the correct path to the script. Adjust script path as per where the plu
Alternatively, you can also clone the repo at a separate location and run this script from inside the cloned repo.

```bash
./scripts/neovim_download.sh -v <version> -d <cache-dir> -o <os-type>
./scripts/neovim_download.sh -v <version> -d <cache-dir> -o <os-type> -a <arch-type> -t <release-type>

# <version> can be stable, nightly or any Neovim release provided like v0.9.4
# <cache-dir> is the path in which the Neovim release and it's checksum should be downloaded. This should be same as the cache_dir plugin configuration value else it won't be
# detected by the plugin. See configuration below.
# <os-type> specifies which OS's binaries should be downloaded. Supported values are "Linux" and "macOS"
# <arch-type> is the host's architecture. Can be `x86_64` or `arm64`
# <release-type> is type of release to download. Can be `binary` or `source`
```

To enable this,
Expand Down
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
## Backlog

1. Use `plenary.async`
2. Add CI runs for the complete workflow run in Ubuntu, MacOS Intel, MacOS M1
3. Create single form for everything
11 changes: 8 additions & 3 deletions doc/remote-nvim.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*remote-nvim.txt* For Neovim >= 0.9.0 Last change: 2024 February 14
*remote-nvim.txt* For Neovim >= 0.9.0 Last change: 2024 April 25

==============================================================================
Table of Contents *remote-nvim-table-of-contents*
Expand Down Expand Up @@ -53,6 +53,8 @@ IMPLEMENTED FEATURES ~

- **Offline mode** - If the remote does not have access to GitHub, Neovim release can be locally
downloaded and then transferred to the remote. For more details, see |remote-nvim-offline-mode|.
- **Building from source/Use globally installed Neovim** - If Neovim is not available for your OS/Arch, you can
build it from source and/or symlink to the globally available Neovim.


PLANNED FEATURES ~
Expand Down Expand Up @@ -80,7 +82,8 @@ OS SUPPORT ~
-----------------------------------------------------------------------
Support level OS
---------------------- ------------------------------------------------
Supported Linux, MacOS
Supported Linux, MacOS, FreeBSD (using build from source
and/or globally available Neovim)

In progress FreeBSD (71)

Expand Down Expand Up @@ -397,12 +400,14 @@ system. Alternatively, you can also clone the repo at a separate location and
run this script from inside the cloned repo.

>bash
./scripts/neovim_download.sh -v <version> -d <cache-dir> -o <os-type>
./scripts/neovim_download.sh -v <version> -d <cache-dir> -o <os-type> -a <arch-type> -t <release-type>

<version> can be stable, nightly or any Neovim release provided like v0.9.4
<cache-dir> is the path in which the Neovim release and it's checksum should be downloaded. This should be same as the cache_dir plugin configuration value else it won't be
detected by the plugin. See configuration below.
<os-type> specifies which OS's binaries should be downloaded. Supported values are "Linux" and "macOS"
<arch-type> is the host's architecture. Can be `x86_64` or `arm64`
<release-type> is type of release to download. Can be `binary` or `source`
<

To enable this,
Expand Down

0 comments on commit c4455b5

Please sign in to comment.