97 lines
2.7 KiB
YAML
97 lines
2.7 KiB
YAML
- name: Install VSCode packages
|
|
aur:
|
|
name: "{{ item }}"
|
|
become: true
|
|
become_user: aur_builder
|
|
loop:
|
|
- visual-studio-code-bin
|
|
- ctags
|
|
- languagetool
|
|
|
|
- name: Create VSCode user directory
|
|
file:
|
|
path: "{{ home }}/.config/Code/User"
|
|
state: directory
|
|
owner: "{{ user }}"
|
|
mode: 0755
|
|
|
|
- name: Install VSCode settings
|
|
copy:
|
|
src: ./files/vscode-settings.json
|
|
dest: "{{ home }}/.config/Code/User/settings.json"
|
|
mode: 0644
|
|
owner: "{{ user }}"
|
|
|
|
- name: Install VSCode keybindings
|
|
copy:
|
|
src: ./files/vscode-keybindings.json
|
|
dest: "{{ home }}/.config/Code/User/keybindings.json"
|
|
mode: 0644
|
|
owner: "{{ user }}"
|
|
|
|
- name: Get VSCode extensions
|
|
shell: code --list-extensions
|
|
become: true
|
|
become_user: "{{ user }}"
|
|
register: vscode_extensions
|
|
changed_when: false
|
|
|
|
- name: Define VSCode extensions
|
|
set_fact:
|
|
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
|
|
- 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
|
|
- jspolancor.presentationmode
|
|
- ms-vscode.cpptools
|
|
- ms-vscode-remote.remote-containers
|
|
- ms-azuretools.vscode-docker
|
|
- yzhang.markdown-all-in-one
|
|
- jock.svg
|
|
- naumovs.color-highlight
|
|
- pranaygp.vscode-css-peek
|
|
- hashicorp.terraform
|
|
- mhutchie.git-graph
|
|
- ms-vscode.wordcount
|
|
- ms-vscode-remote.remote-ssh
|
|
- wmaurer.change-case
|
|
- bibhasdn.django-html
|
|
- GitHub.vscode-pull-request-github
|
|
- RandomFractalsInc.vscode-data-preview
|
|
- vstirbu.vscode-mermaid-preview
|
|
- davidlday.languagetool-linter
|
|
- ms-toolsai.jupyter
|
|
- bbenoist.vagrant
|
|
- GitLab.gitlab-workflow
|
|
|
|
- name: Install VSCode extensions
|
|
shell: code --install-extension {{ item }} --force
|
|
become: true
|
|
become_user: "{{ user }}"
|
|
when: item not in vscode_extensions.stdout_lines
|
|
loop: "{{ requested_vscode_extensions }}"
|
|
|
|
- name: Remove unwanted VSCode extensions
|
|
shell: code --uninstall-extension {{ item }}
|
|
become: true
|
|
become_user: "{{ user }}"
|
|
when: item not in requested_vscode_extensions
|
|
loop: "{{ vscode_extensions.stdout_lines }}"
|