Jake Howard
361590dc36
Some checks failed
/ lint (push) Failing after 1m42s
It's much more lightweight, and integrates nicer as a language server
92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
- name: Install VSCode packages
|
|
kewlfft.aur.aur:
|
|
name: "{{ item }}"
|
|
become: true
|
|
become_user: aur_builder
|
|
loop:
|
|
- visual-studio-code-bin
|
|
- ctags
|
|
|
|
- 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
|
|
- mathematic.vscode-latex
|
|
- streetsidesoftware.code-spell-checker
|
|
- EditorConfig.EditorConfig
|
|
- redhat.ansible
|
|
- redhat.vscode-yaml
|
|
- rust-lang.rust-analyzer
|
|
- 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
|
|
- hashicorp.terraform
|
|
- ms-vscode.wordcount
|
|
- ms-vscode-remote.remote-ssh
|
|
- wmaurer.change-case
|
|
- bibhasdn.django-html
|
|
- vstirbu.vscode-mermaid-preview
|
|
- valentjn.vscode-ltex
|
|
- bbenoist.vagrant
|
|
- mkhl.direnv
|
|
- charliermarsh.ruff
|
|
|
|
- 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 }}"
|