66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
- name: ensure neovim configuration directories exist
|
|
file:
|
|
path: '{{ item }}'
|
|
state: directory
|
|
loop:
|
|
- '{{ xdg_config_dir }}/nvim/'
|
|
- '{{ xdg_config_dir }}/nvim/lua'
|
|
- '{{ xdg_data_dir }}/nvim/site'
|
|
- '{{ xdg_data_dir }}/nvim/site/pack'
|
|
- '{{ xdg_data_dir }}/nvim/site/pack/default'
|
|
- '{{ xdg_data_dir }}/nvim/site/pack/default/start'
|
|
|
|
- name: clone neovim packages
|
|
git:
|
|
repo: '{{ item.url }}'
|
|
dest: '{{ xdg_data_dir }}/nvim/site/pack/default/start/{{ item.name }}'
|
|
update: true
|
|
loop: '{{ vim_plugins }}'
|
|
|
|
- name: install pynvim package
|
|
pip:
|
|
name:
|
|
- neovim
|
|
- pynvim
|
|
|
|
- name: remove old neovim configuration file
|
|
file:
|
|
path: '{{ xdg_config_dir }}/nvim/init.vim'
|
|
state: absent
|
|
|
|
- name: remove coc.nvim extension
|
|
file:
|
|
path: '{{ xdg_data_dir }}/nvim/site/pack/default/start/coc.nvim'
|
|
state: absent
|
|
|
|
- name: setup neovim configuration files
|
|
file:
|
|
path: '{{ item.dest }}'
|
|
src: '{{ item.src }}'
|
|
state: link
|
|
force: true
|
|
loop:
|
|
- {
|
|
src: '{{ ansible_env.HOME }}/dotfiles/nvim/init.lua',
|
|
dest: '{{ xdg_config_dir }}/nvim/init.lua',
|
|
}
|
|
- {
|
|
src: '{{ ansible_env.HOME }}/dotfiles/nvim/lua/auto-commands.lua',
|
|
dest: '{{ xdg_config_dir }}/nvim/lua/auto-commands.lua',
|
|
}
|
|
- {
|
|
src: '{{ ansible_env.HOME }}/dotfiles/nvim/lua/keybindings.lua',
|
|
dest: '{{ xdg_config_dir }}/nvim/lua/keybindings.lua',
|
|
}
|
|
- {
|
|
src: '{{ ansible_env.HOME }}/dotfiles/nvim/lua/lsp.lua',
|
|
dest: '{{ xdg_config_dir }}/nvim/lua/lsp.lua',
|
|
}
|
|
- {
|
|
src: '{{ ansible_env.HOME }}/dotfiles/nvim/lua/nvim-cmp.lua',
|
|
dest: '{{ xdg_config_dir }}/nvim/lua/nvim-cmp.lua',
|
|
}
|
|
- {
|
|
src: '{{ ansible_env.HOME }}/dotfiles/nvim/lua/options.lua',
|
|
dest: '{{ xdg_config_dir }}/nvim/lua/options.lua',
|
|
}
|