From 683366b7a4fa398dfa248f7b11961c136b567a69 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Wed, 11 Nov 2020 15:40:20 +0100 Subject: [PATCH] Install neovim as appimage --- roles/neovim/tasks/main.yaml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/roles/neovim/tasks/main.yaml b/roles/neovim/tasks/main.yaml index a043871..e25944f 100644 --- a/roles/neovim/tasks/main.yaml +++ b/roles/neovim/tasks/main.yaml @@ -1,13 +1,37 @@ --- -- name: install required packages +- name: install prerequisites package: name: - - python3 + - nodejs + - npm - python-neovim - - neovim + - python3 - ripgrep state: latest +- name: download neovim appimage + get_url: + url: https://github.com/neovim/neovim/releases/latest/download/nvim.appimage + dest: /tmp + mode: "0755" + +- name: extract neovim appimage + shell: | + rm -rf /usr/local/bin/nvim.appimage + /tmp/nvim.appimage --appimage-extract + mv squashfs-root /usr/local/bin/nvim.appimage + chmod -R 4755 /usr/local/bin/nvim.appimage + chmod -R -s /usr/local/bin/nvim.appimage + rm -f /tmp/nvim.appimage + args: + chdir: /tmp + +- name: install neovim link + alternatives: + name: nvim + path: /usr/local/bin/nvim.appimage/usr/bin/nvim + link: /usr/bin/nvim + - name: create nvim plugin directory become_user: "{{ account.name }}" file: