Ansible: Add tasks for setting up neovim and vim

This commit is contained in:
Eryn Wells 2025-01-31 16:34:03 -08:00
parent baed6171dc
commit d022b579d2
3 changed files with 38 additions and 0 deletions

View file

@ -1,3 +1,8 @@
---
- name: Configure ZSH
import_tasks: zsh.yml
- name: Configure vim
import_tasks: vim.yml
- name: Configure neovim
import_tasks: neovim.yml

View file

@ -0,0 +1,10 @@
---
- name: "neovim : Install neovim"
ansible.builtin.package:
name: neovim
state: present
- name: "neovim : Symlink config"
ansible.builtin.include_tasks: symlink_dotfile_directory.yml
vars:
dotfile_src: config/nvim

View file

@ -0,0 +1,23 @@
---
- name: "vim : Symlink config files"
ansible.builtin.include_tasks: symlink_dotfile.yml
vars:
dotfile_src: "{{ item }}"
loop:
- vimrc
- vimrc.common
# The viminfo file goes here, but vim won't write it if the directory doesn't exist.
- name: "vim : Create vim state directory"
ansible.builtin.file:
path: "{{ ansible_local.xdg.state_home }}/vim"
owner: "{{ ansible_user_id }}"
mode: 0750
state: directory
- name: "vim : Symlink runtime directory"
ansible.builtin.include_tasks: symlink_dotfile_directory.yml
vars:
dotfile_src: "{{ item }}"
loop:
- vim