68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
---
|
|
- name: install prerequisites (apt)
|
|
package:
|
|
name:
|
|
- nodejs
|
|
- npm
|
|
- python
|
|
- python-pip
|
|
- ripgrep
|
|
state: latest
|
|
|
|
- name: install prerequisites (pip)
|
|
become_user: "{{ account.name }}"
|
|
pip:
|
|
name:
|
|
- pynvim
|
|
state: latest
|
|
extra_args: --user
|
|
|
|
- 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:
|
|
path: "{{ account.home }}/.local/share/nvim/site/autoload/"
|
|
state: directory
|
|
|
|
- name: install vim-plug
|
|
become_user: "{{ account.name }}"
|
|
get_url:
|
|
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
dest: "{{ account.home }}/.local/share/nvim/site/autoload/plug.vim"
|
|
|
|
- name: install nvim config
|
|
become_user: "{{ account.name }}"
|
|
shell:
|
|
chdir: "{{ dotfiles }}/nvim"
|
|
cmd: ./install.sh
|
|
creates: "{{ account.home }}/.config/nvim/init.vim"
|
|
|
|
- name: install nvim plugins
|
|
become_user: "{{ account.name }}"
|
|
shell:
|
|
cmd: nvim +PlugInstall +PlugUpdate +qall
|
|
|
|
|