dotfiles/tasks/vscode.yml

83 lines
2.3 KiB
YAML
Raw Normal View History

2019-03-14 21:34:29 +00:00
- name: "Install VSCode packages"
aur:
skip_installed: true
name: "{{ item }}"
become: true
become_user: aur_builder
when: "item not in installed_packages.stdout_lines"
with_items:
- 'community/code'
- 'universal-ctags-git'
2019-05-25 16:50:09 +01:00
- name: Create VSCode user directory
file:
2019-05-25 10:27:00 +01:00
path: '{{ home }}/.config/Code - OSS/User'
2018-10-06 12:47:13 +01:00
state: directory
owner: "{{ user }}"
mode: 0755
2019-05-25 16:50:09 +01:00
- name: Install VSCode settings
copy:
2018-09-10 09:20:53 +01:00
src: ./files/vscode-settings.json
2019-05-25 10:27:00 +01:00
dest: "{{ home }}/.config/Code - OSS/User/settings.json"
2018-09-10 09:20:53 +01:00
mode: 0644
2018-09-17 17:22:15 +01:00
owner: "{{ user }}"
2018-09-10 09:20:53 +01:00
2019-05-25 16:50:09 +01:00
- name: Install VSCode keybindings
copy:
2018-09-10 09:20:53 +01:00
src: ./files/vscode-keybindings.json
2019-05-25 10:27:00 +01:00
dest: "{{ home }}/.config/Code - OSS/User/keybindings.json"
2018-09-10 09:20:53 +01:00
mode: 0644
2018-09-17 17:22:15 +01:00
owner: "{{ user }}"
2018-09-11 09:12:11 +01:00
2018-09-14 09:01:11 +01:00
- name: "Get VSCode extensions"
shell: "code --list-extensions"
become: true
2018-09-17 17:22:15 +01:00
become_user: "{{ user }}"
2018-09-11 09:12:11 +01:00
register: vscode_extensions
2019-05-24 20:51:35 +01:00
- set_fact:
requested_vscode_extensions:
2019-05-25 00:23:05 +01:00
- 'PKief.material-icon-theme'
- 'Zignd.html-css-class-completion'
- 'christian-kohler.npm-intellisense'
- 'dbaeumer.vscode-eslint'
- 'eamodio.gitlens'
- 'ms-vscode.vscode-typescript-tslint-plugin'
- 'ionutvmi.path-autocomplete'
- 'mrmlnc.vscode-less'
- 'mrmlnc.vscode-scss'
- 'ms-python.python'
- 'ms-vscode.sublime-keybindings'
- 'rokoroku.vscode-theme-darcula'
- 'truman.autocomplate-shell'
- 'wholroyd.jinja'
- 'formulahendry.auto-close-tag'
- 'James-Yu.latex-workshop'
- 'streetsidesoftware.code-spell-checker'
- 'EditorConfig.EditorConfig'
- 'vsciot-vscode.vscode-arduino'
- 'vscoss.vscode-ansible'
- 'rust-lang.rust'
- 'pnp.polacode'
- 'mrmlnc.vscode-duplicate'
- 'Tyriar.sort-lines'
- 'esbenp.prettier-vscode'
- 'jspolancor.presentationmode'
- 'ms-vscode.cpptools'
2019-08-04 21:39:07 +01:00
- 'yamajyn.commandlist'
2019-05-24 20:51:35 +01:00
2018-09-11 09:12:11 +01:00
- name: "Install VSCode extensions"
shell: "code --install-extension {{ item }} --force"
2018-09-14 09:01:11 +01:00
become: true
2018-09-17 17:22:15 +01:00
become_user: "{{ user }}"
2018-09-14 09:01:11 +01:00
when: "item not in vscode_extensions.stdout_lines"
2019-05-24 20:51:35 +01:00
with_items: "{{ requested_vscode_extensions }}"
2019-05-25 16:50:09 +01:00
- name: "Remove unwanted VSCode extensions"
2019-05-24 20:51:35 +01:00
shell: "code --uninstall-extension {{ item }}"
become: true
become_user: "{{ user }}"
when: "item not in requested_vscode_extensions"
with_items: "{{ vscode_extensions.stdout_lines }}"