Update neovim configuration
This commit is contained in:
parent
c1b9f491e4
commit
5f3cdb3efb
6 changed files with 70 additions and 30 deletions
|
|
@ -23,6 +23,7 @@
|
|||
name: common
|
||||
tasks_from: 'poetry.yml'
|
||||
- import_tasks: 'tasks/dotfiles.yml'
|
||||
- import_tasks: 'tasks/neovim.yml'
|
||||
vars_files:
|
||||
- 'vars/main.yml'
|
||||
- 'vars/{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml'
|
||||
|
|
|
|||
|
|
@ -5,15 +5,6 @@
|
|||
version: master
|
||||
update: yes
|
||||
|
||||
- name: create dotfile folders
|
||||
file:
|
||||
state: directory
|
||||
mode: '0755'
|
||||
path: '{{ item }}'
|
||||
loop:
|
||||
- '{{ xdg_config_dir }}/nvim'
|
||||
- '{{ xdg_data_dir }}/nvim/site'
|
||||
|
||||
- name: setup dotfiles
|
||||
file:
|
||||
path: '{{ item.dest }}'
|
||||
|
|
@ -21,10 +12,6 @@
|
|||
state: link
|
||||
force: true
|
||||
loop:
|
||||
- {
|
||||
src: '{{ ansible_env.HOME }}/dotfiles/nvim/init.vim',
|
||||
dest: '{{ xdg_config_dir }}/nvim/init.vim',
|
||||
}
|
||||
- {
|
||||
src: '{{ ansible_env.HOME }}/dotfiles/.vimrc',
|
||||
dest: '{{ ansible_env.HOME }}/.vimrc',
|
||||
|
|
|
|||
|
|
@ -11,20 +11,6 @@
|
|||
update: true
|
||||
version: master
|
||||
|
||||
- name: clone neovim packages
|
||||
git:
|
||||
repo: '{{ item.url }}'
|
||||
dest: '{{ xdg_data_dir }}/nvim/site/pack/default/start/{{ item.name }}'
|
||||
version: master
|
||||
update: true
|
||||
loop: '{{ vim_plugins }}'
|
||||
|
||||
- name: install pynvim package
|
||||
pip:
|
||||
name:
|
||||
- neovim
|
||||
- pynvim
|
||||
|
||||
- name: copy konsole configuration files
|
||||
template:
|
||||
src: '{{ item.src }}'
|
||||
|
|
|
|||
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',
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ packages:
|
|||
- vim
|
||||
- neovim
|
||||
- npm
|
||||
- ctags
|
||||
- docker
|
||||
- docker-compose
|
||||
- ttf-ibm-plex
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ githook_repo: 'git@git.fudiggity.nl:sonny/git-hooks.git'
|
|||
|
||||
vim_plugins:
|
||||
- { url: 'https://github.com/preservim/nerdtree', name: 'nerdtree' }
|
||||
- { url: 'https://github.com/neoclide/coc.nvim', name: 'coc.nvim' }
|
||||
- { url: 'https://github.com/sheerun/vim-polyglot', name: 'vim-polygot' }
|
||||
- { url: 'https://github.com/arzg/vim-colors-xcode.git', name: 'vim-colors-xcode' }
|
||||
- { url: 'https://github.com/neovim/nvim-lspconfig', name: 'nvim-lspconfig' }
|
||||
- { url: 'https://github.com/hrsh7th/nvim-cmp/', name: 'nvim-cmp' }
|
||||
- { url: 'https://github.com/hrsh7th/cmp-nvim-lsp/', name: 'cmp-nvim-lsp' }
|
||||
|
||||
gitlab_domain: 'git.fudiggity.nl'
|
||||
gitlab_host_key: 'git.fudiggity.nl ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICNmvcxza79T7JZMkifmquwXH/kMUqDnKs9Oob+JrRvn'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue