This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-machine-setup/roles/neovim/tasks/main.yaml

51 lines
1.1 KiB
YAML
Raw Normal View History

2020-05-31 10:17:10 +00:00
---
2020-11-13 07:51:11 +00:00
- name: install prerequisites (apt)
2020-05-31 10:17:10 +00:00
package:
name:
2020-11-11 14:40:20 +00:00
- nodejs
- npm
2021-01-28 13:27:05 +00:00
- python
- python-pip
2020-05-31 10:17:10 +00:00
- ripgrep
state: latest
2020-11-13 07:51:11 +00:00
- name: install prerequisites (pip)
become_user: "{{ account.name }}"
pip:
name:
- pynvim
state: latest
extra_args: --user
2021-01-28 13:27:05 +00:00
- name: install neovim
package:
name:
- neovim
state: latest
2020-11-11 14:40:20 +00:00
2020-05-31 10:17:10 +00:00
- 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:
2020-05-31 10:52:20 +00:00
chdir: "{{ dotfiles }}/nvim"
2020-05-31 10:17:10 +00:00
cmd: ./install.sh
creates: "{{ account.home }}/.config/nvim/init.vim"
- name: install nvim plugins
become_user: "{{ account.name }}"
shell:
cmd: nvim +PlugInstall +PlugUpdate +qall