dotfiles/tasks/vscode.yml

100 lines
2.8 KiB
YAML
Raw Normal View History

- name: Install VSCode packages
2019-03-14 21:34:29 +00:00
aur:
name: "{{ item }}"
become: true
become_user: aur_builder
when: item not in installed_packages.stdout_lines
loop:
- visual-studio-code-bin
2020-06-09 15:18:53 +01:00
- ctags
- languagetool
2019-03-14 21:34:29 +00:00
2019-05-25 16:50:09 +01:00
- name: Create VSCode user directory
file:
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
- name: Get VSCode extensions
shell: code --list-extensions
2018-09-14 09:01:11 +01:00
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-11-18 13:09:43 +00:00
- name: Define VSCode extensions
set_fact:
2019-05-24 20:51:35 +01:00
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
- ms-vscode-remote.remote-containers
- ms-azuretools.vscode-docker
- mrcrowl.hg
- 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-11-29 22:51:59 +00:00
- mhutchie.git-graph
2020-03-06 11:58:49 +00:00
- ms-vscode.wordcount
2020-03-10 08:39:01 +00:00
- ms-vscode-remote.remote-ssh
2020-03-10 17:05:34 +00:00
- wmaurer.change-case
- bibhasdn.django-html
- github.vscode-pull-request-github
2020-03-10 17:34:31 +00:00
- randomfractalsinc.vscode-data-preview
2020-03-31 13:11:27 +01:00
- vstirbu.vscode-mermaid-preview
- davidlday.languagetool-linter
2019-05-24 20:51:35 +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 }}"
when: item not in vscode_extensions.stdout_lines
loop: "{{ requested_vscode_extensions }}"
2019-05-24 20:51:35 +01:00
- name: Remove unwanted VSCode extensions
shell: code --uninstall-extension {{ item }}
2019-05-24 20:51:35 +01:00
become: true
become_user: "{{ user }}"
when: item not in requested_vscode_extensions
loop: "{{ vscode_extensions.stdout_lines }}"