aboutsummaryrefslogtreecommitdiffstats
path: root/roles/vim/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/vim/tasks')
-rw-r--r--roles/vim/tasks/main.yaml35
1 files changed, 35 insertions, 0 deletions
diff --git a/roles/vim/tasks/main.yaml b/roles/vim/tasks/main.yaml
new file mode 100644
index 0000000..0609f9b
--- /dev/null
+++ b/roles/vim/tasks/main.yaml
@@ -0,0 +1,35 @@
+---
+- name: Create folders
+ file:
+ path: "{{ lookup('env', 'HOME') }}/.config/nvim/autoload"
+ state: directory
+
+- name: Link configuration
+ file:
+ src: "{{ role_path }}/files/init.vim"
+ dest: "{{ lookup('env', 'HOME') }}/.config/nvim/init.vim"
+ state: link
+
+- name: Install packages
+ become: yes
+
+ dnf:
+ name: "{{ item.key }}"
+ state: "{{ item.value.state | default('present') }}"
+
+ with_dict: "{{packages}}"
+ vars:
+ packages:
+ python:
+ python-devel:
+ python-neovim:
+ vim:
+ neovim:
+
+- name: Install vim-plug
+ get_url:
+ url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+ dest: "$HOME/.config/nvim/autoload/plug.vim"
+
+- name: Install vim-plug plugins
+ shell: nvim +PlugInstall +qall --headless