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:
|
2019-09-03 12:16:12 +01:00
|
|
|
- 'visual-studio-code-bin'
|
2019-03-14 21:34:29 +00:00
|
|
|
- 'universal-ctags-git'
|
|
|
|
|
2019-05-25 16:50:09 +01:00
|
|
|
- name: Create VSCode user directory
|
|
|
|
file:
|
2019-09-03 12:18:04 +01:00
|
|
|
path: '{{ home }}/.config/Code/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-09-03 12:18:04 +01:00
|
|
|
dest: "{{ home }}/.config/Code/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-09-03 12:18:04 +01:00
|
|
|
dest: "{{ home }}/.config/Code/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-09-03 12:16:12 +01:00
|
|
|
- 'ms-vscode-remote.remote-containers'
|
2019-09-03 12:22:24 +01:00
|
|
|
- 'ms-azuretools.vscode-docker'
|
2019-09-03 12:22:52 +01:00
|
|
|
- 'mrcrowl.hg'
|
2019-09-18 09:47:07 +01:00
|
|
|
- 'yzhang.markdown-all-in-one'
|
2019-10-29 16:23:23 +00:00
|
|
|
- jock.svg
|
|
|
|
- naumovs.color-highlight
|
|
|
|
- pranaygp.vscode-css-peek
|
|
|
|
- mauve.terraform
|
|
|
|
|
2019-05-24 20:51:35 +01:00
|
|
|
|
2018-09-11 09:12:11 +01:00
|
|
|
- name: "Install VSCode extensions"
|
2018-10-15 09:04:56 +01:00
|
|
|
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 }}"
|