Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions roles/vim/files/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-- Ansible managed

-- Show trailing whitespace
vim.opt.list = true
vim.opt.listchars = { trail = "·"}

-- Disable swap files
vim.opt.swapfile = false

-- Style
vim.opt.number = true
vim.opt.cursorline = true

-- Mouse
vim.opt.mouse = "a"

-- Copying
vim.opt.clipboard = "unnamedplus"

-- Replace tabs with spaces
vim.opt.expandtab = true

vim.opt.tabstop = 4
vim.opt.shiftwidth = 4

vim.opt.guicursor = ""
45 changes: 0 additions & 45 deletions roles/vim/files/init.vim

This file was deleted.

20 changes: 5 additions & 15 deletions roles/vim/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,15 @@
community.general.pacman:
name:
- "neovim"
- "vim"

- name: "Create directories"
- name: "Create .config/nvim/"
ansible.builtin.file:
path: "{{ ansible_user_dir }}/{{ item }}"
path: "{{ ansible_user_dir }}/.config/nvim/"
state: "directory"
mode: "0755"
loop:
- ".config/nvim/"
- ".local/share/nvim/site/autoload/"

- name: "Copy init.vim"
- name: "Copy init.lua"
ansible.builtin.copy:
src: "init.vim"
dest: "{{ ansible_user_dir }}/.config/nvim/init.vim"
mode: "0644"

- name: "Install vim-plug"
ansible.builtin.get_url:
url: "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
dest: "{{ ansible_user_dir }}/.local/share/nvim/site/autoload/plug.vim"
src: "init.lua"
dest: "{{ ansible_user_dir }}/.config/nvim/init.lua"
mode: "0644"
Loading
Loading