- name: Install neovim
  become: true
  package:
    name:
      - neovim
    state: present

- name: clone Packer repo (Install packer)
  ansible.builtin.git:
    repo: https://github.com/wbthomason/packer.nvim.git
    depth: 1
    dest: ~/.local/share/nvim/site/pack/packer/start/packer.nvim
    update: no

- name: Linking up nvim config folder
  file:
    src: "{{ playbook_dir }}/files/dotfiles/nvim"
    dest: ~/.config/nvim
    state: link
    owner: "{{ ansible_user_id }}"
    group: "{{ ansible_user_id }}"
