dotfiles/tasks/vscode.yml

99 lines
2.7 KiB
YAML
Raw Normal View History

- name: Install VSCode packages
kewlfft.aur.aur:
2019-03-14 21:34:29 +00:00
name: "{{ item }}"
become: true
become_user: aur_builder
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
2021-02-07 14:23:56 +00:00
changed_when: false
2018-09-11 09:12:11 +01:00
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
- dbaeumer.vscode-eslint
- eamodio.gitlens
- ionutvmi.path-autocomplete
- mrmlnc.vscode-scss
- ms-python.python
- ms-vscode.sublime-keybindings
- rokoroku.vscode-theme-darcula
- truman.autocomplate-shell
- wholroyd.jinja
- formulahendry.auto-close-tag
2021-11-07 22:08:22 +00:00
- mathematic.vscode-latex
- streetsidesoftware.code-spell-checker
- EditorConfig.EditorConfig
- vsciot-vscode.vscode-arduino
- zbr.vscode-ansible
- redhat.vscode-yaml
- rust-lang.rust
- pnp.polacode
- mrmlnc.vscode-duplicate
- Tyriar.sort-lines
- jspolancor.presentationmode
- ms-vscode.cpptools
- ms-vscode-remote.remote-containers
- ms-azuretools.vscode-docker
- yzhang.markdown-all-in-one
2019-10-29 16:23:23 +00:00
- jock.svg
- naumovs.color-highlight
- pranaygp.vscode-css-peek
2020-06-15 12:33:34 +01:00
- hashicorp.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
2021-02-07 14:34:40 +00:00
- GitHub.vscode-pull-request-github
2020-03-31 13:11:27 +01:00
- vstirbu.vscode-mermaid-preview
- davidlday.languagetool-linter
2021-02-07 14:34:40 +00:00
- ms-toolsai.jupyter
- bbenoist.vagrant
- GitLab.gitlab-workflow
2021-08-22 17:49:08 +01:00
- formulahendry.auto-rename-tag
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 }}"