Configure (n)vim with Ansible. Fully
This commit is contained in:
parent
dd0e5a2189
commit
72e54fd8f7
43 changed files with 355 additions and 378 deletions
|
@ -1,14 +1,46 @@
|
|||
- name: Create nvim configuration directory
|
||||
- name: Set vim variants to use
|
||||
set_fact:
|
||||
vim_variants:
|
||||
- vim
|
||||
- nvim
|
||||
# TODO vim-minimal for bsh
|
||||
# TODO Select those in a clever way
|
||||
|
||||
- name: Create vim configuration directory
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ ansible_user_dir }}/.config/{{ item }}"
|
||||
mode: "u=rwx,g=rx,o=rx"
|
||||
with_items:
|
||||
- nvim
|
||||
loop: "{{ vim_variants }}"
|
||||
|
||||
- name: Configure nvim
|
||||
template:
|
||||
src: nvim.j2
|
||||
dest: "{{ ansible_user_dir }}/.config/nvim/init.vim"
|
||||
- name: Install vim-plug
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
dest: "{{ ansible_user_dir }}/.config/vim/plug.vim"
|
||||
mode: "u=rw,g=r,o=r"
|
||||
tags: g
|
||||
|
||||
- name: Install loader
|
||||
template:
|
||||
src: loader.j2
|
||||
dest: "{{ ansible_user_dir }}/.config/vim/loader.vim"
|
||||
mode: "u=rw,g=r,o=r"
|
||||
|
||||
- name: Configure vim plugin list
|
||||
template:
|
||||
src: plugininstall.j2
|
||||
dest: "{{ ansible_user_dir }}/.config/{{ variant }}/plugininstall.vim"
|
||||
mode: "u=rw,g=r,o=r"
|
||||
notify:
|
||||
- "{{ variant }} plugins changed"
|
||||
loop: "{{ vim_variants }}"
|
||||
loop_control:
|
||||
loop_var: variant
|
||||
|
||||
- name: Configure vim
|
||||
template:
|
||||
src: init.vim.j2
|
||||
dest: "{{ ansible_user_dir }}/.config/{{ variant }}/init.vim"
|
||||
mode: "u=rw,g=r,o=r"
|
||||
loop: "{{ vim_variants }}"
|
||||
loop_control:
|
||||
loop_var: variant
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue