From c6ea1ed4dc090ae5dd1bc858bf77b8a96292404a Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 30 Dec 2024 12:39:50 +0100 Subject: [PATCH] feat(editor_vscode): install extensions Fixes #63 Signed-off-by: Matej Focko --- group_vars/desktops/vars | 99 +++++++++++++++++++++++++++ roles/editor_vscode/defaults/main.yml | 3 + roles/editor_vscode/tasks/main.yml | 8 +++ 3 files changed, 110 insertions(+) create mode 100644 roles/editor_vscode/defaults/main.yml diff --git a/group_vars/desktops/vars b/group_vars/desktops/vars index aa6ee17..1d44153 100644 --- a/group_vars/desktops/vars +++ b/group_vars/desktops/vars @@ -14,3 +14,102 @@ flatpak_apps: - org.telegram.desktop # - org.x.Warpinator - org.flameshot.Flameshot + +editor_vscode_extensions: + # C/C++ + - bazelbuild.vscode-bazel + - ms-vscode.cmake-tools + - ms-vscode.cpptools + - ms-vscode.cpptools-extension-pack + - ms-vscode.cpptools-themes + - twxs.cmake + + # C# + - ms-dotnettools.csdevkit + - ms-dotnettools.csharp + - ms-dotnettools.vscode-dotnet-runtime + - ms-dotnettools.vscodeintellicode-csharp + + # Deno + - denoland.vscode-deno + + # Go + - golang.go + + # Hare + - adotinthevoid.hare-highlighting + + # Java + - redhat.java + - vscjava.vscode-gradle + - vscjava.vscode-java-debug + - vscjava.vscode-java-dependency + - vscjava.vscode-java-pack + - vscjava.vscode-java-test + - vscjava.vscode-maven + + # Kotlin + - mathiasfrohlich.kotlin + + # Python + - charliermarsh.ruff + - ms-python.debugpy + - ms-python.python + - ms-python.vscode-pylance + - ms-toolsai.jupyter + - ms-toolsai.jupyter-keymap + - ms-toolsai.jupyter-renderers + - ms-toolsai.vscode-jupyter-cell-tags + - ms-toolsai.vscode-jupyter-slideshow + + # Rust + - rust-lang.rust-analyzer + + # Swift + - sswg.swift-lang + - vadimcn.vscode-lldb + + # Zig + - ziglang.vscode-zig + + # Git + - eamodio.gitlens + + # Themes + - akamud.vscode-theme-onedark + - akamud.vscode-theme-onelight + - alexandernanberg.horizon-theme-vscode + - atomiks.moonlight + - avidworks.vampiro + - catppuccin.catppuccin-vsc + - ddiu8081.moegi-theme + - dracula-theme.theme-dracula + - enkia.tokyo-night + - fabiospampinato.vscode-monokai-night + - github.github-vscode-theme + - gnhuy91.theme-oceanicnext-sublime + - ibmlover.oxocarbon + - keifererikson.nightfox + - liviuschera.noctis + - mcagampan.dark-horizon + - ms-vscode.theme-tomorrowkit + - mvllow.rose-pine + - sdras.night-owl + - teabyii.ayu + - tomphilbin.gruvbox-themes + - vincentfiestada.cold-horizon-vscode + - zhuangtongfa.material-theme + + # Misc + - asciidoctor.asciidoctor-vscode + - cs50.vscode-presentation-mode + - danielgjackson.auto-dark-mode-windows + - editorconfig.editorconfig + - ms-vscode-remote.remote-containers + - tamasfe.even-better-toml + - unifiedjs.vscode-mdx + - vscodevim.vim + + # Where does this come from? + - visualstudioexptteam.intellicode-api-usage-examples + - visualstudioexptteam.vscodeintellicode diff --git a/roles/editor_vscode/defaults/main.yml b/roles/editor_vscode/defaults/main.yml new file mode 100644 index 0000000..8d0b477 --- /dev/null +++ b/roles/editor_vscode/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# List of VSCode extensions to be installed with the VSCode +editor_vscode_extensions: [] diff --git a/roles/editor_vscode/tasks/main.yml b/roles/editor_vscode/tasks/main.yml index 4a1f134..607f083 100644 --- a/roles/editor_vscode/tasks/main.yml +++ b/roles/editor_vscode/tasks/main.yml @@ -17,3 +17,11 @@ loop: - settings - keybindings + +- name: Install extensions + ansible.builtin.command: + cmd: code-insiders --install-extension {{ item }} + register: _editor_vscode_installation_result + changed_when: '"was successfully installed." in _editor_vscode_installation_result.stdout' + failed_when: '"Error while installing extensions" in _editor_vscode_installation_result.stderr' + loop: "{{ editor_vscode_extensions }}"