78 lines
2.2 KiB
YAML
78 lines
2.2 KiB
YAML
- 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'
|
|
|
|
- file:
|
|
path: '{{ home }}/.config/Code - OSS/User'
|
|
state: directory
|
|
owner: "{{ user }}"
|
|
mode: 0755
|
|
|
|
- copy:
|
|
src: ./files/vscode-settings.json
|
|
dest: "{{ home }}/.config/Code - OSS/User/settings.json"
|
|
mode: 0644
|
|
owner: "{{ user }}"
|
|
|
|
- copy:
|
|
src: ./files/vscode-keybindings.json
|
|
dest: "{{ home }}/.config/Code - OSS/User/keybindings.json"
|
|
mode: 0644
|
|
owner: "{{ user }}"
|
|
|
|
- name: "Get VSCode extensions"
|
|
shell: "code --list-extensions"
|
|
become: true
|
|
become_user: "{{ user }}"
|
|
register: vscode_extensions
|
|
|
|
- set_fact:
|
|
requested_vscode_extensions:
|
|
- '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'
|
|
|
|
- name: "Install VSCode extensions"
|
|
shell: "code --install-extension {{ item }} --force"
|
|
become: true
|
|
become_user: "{{ user }}"
|
|
when: "item not in vscode_extensions.stdout_lines"
|
|
with_items: "{{ requested_vscode_extensions }}"
|
|
|
|
- name: "Remove unversioned VSCode extensions"
|
|
shell: "code --uninstall-extension {{ item }}"
|
|
become: true
|
|
become_user: "{{ user }}"
|
|
when: "item not in requested_vscode_extensions"
|
|
with_items: "{{ vscode_extensions.stdout_lines }}"
|