Added vim state

This commit is contained in:
Jonas Forsberg
2020-07-31 15:12:20 +02:00
parent c936a030a4
commit 4e2fdd73e7
7 changed files with 32 additions and 7 deletions

View File

@@ -1,3 +1,3 @@
```
sudo salt-call --local "$@"
alias salt='sudo salt-call --local "$@"'
```

View File

@@ -1,5 +1,4 @@
packages:
vim: { status: installed }
git: { status: installed }
curl: { status: installed }
tmux: { status: installed }
@@ -7,9 +6,9 @@ packages:
terminator: { status: installed }
borgbackup: { status: installed }
go: { status: installed }
nextcloud-client: { status: installed }
nextcloud-desktop: { status: installed }
keepassxc: { status: installed }
vim-plugin-gnupg: { status: installed }
# vim-instant-markdown
xdg-utils: { status: installed }
nodejs10 { status: installed }
nodejs10: { status: installed }

View File

@@ -3,6 +3,7 @@ base:
- user
- packages
- repositories
- vim
{% if salt['file.file_exists']('hosts/{0}.sls'.format(grains.id)) %}
'{{ grains.id }}':

15
salt/pillars/vim.sls Normal file
View File

@@ -0,0 +1,15 @@
packages:
vim: { status: installed }
vim:
plugins:
jonas:
calendar-vim:
name: https://github.com/mattn/calendar-vim.git
vim-commentary:
name: https://github.com/tpope/vim-commentary.git
vim-instant-markdown:
name: https://github.com/suan/vim-instant-markdown.git
vim-surround:
name: https://github.com/tpope/vim-surround.git

9
salt/states/vim.sls Normal file
View File

@@ -0,0 +1,9 @@
{% for user, plugins in pillar['vim']['plugins'].items() %}
{% for plugin, args in plugins.items() %}
{{ plugin }}:
git.latest:
- name: {{ args['name'] }}
- target: {{ salt['user.info']( user ).home }}/.vim/bundle/{{ plugin }}
- user: {{ user }}
{% endfor %}
{% endfor %}