Update neovim configuration
This commit is contained in:
parent
c1b9f491e4
commit
5f3cdb3efb
6 changed files with 70 additions and 30 deletions
66
tasks/neovim.yml
Normal file
66
tasks/neovim.yml
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
- 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',
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue