From 2cc3de04840e7c6878af1b6ff16330627cd1b60b Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Fri, 21 Jun 2024 15:04:03 +0200 Subject: [PATCH] Use Theia Built-In Plugin --- .github/workflows/build.yml | 6 +- images/README.md | 9 ++- images/base-ide/package.json | 74 ++++++++++++++++++- images/c/package.json | 72 ++++++++++++++++++- images/{java17-21 => java-17}/ToolDockerfile | 0 images/{java17-21 => java-17}/package.json | 0 images/swift/package.json | 75 +++++++++++++++++++- 7 files changed, 226 insertions(+), 10 deletions(-) rename images/{java17-21 => java-17}/ToolDockerfile (100%) rename images/{java17-21 => java-17}/package.json (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 788a6072a..630896b93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,8 +21,8 @@ jobs: matrix: docker-context: ['.'] include: - - docker-file: images/java17-21/ToolDockerfile - image-name: ghcr.io/ls1intum/theia/java17-21 + - docker-file: images/java-17/ToolDockerfile + image-name: ghcr.io/ls1intum/theia/java-17 - docker-file: images/swift/ToolDockerfile image-name: ghcr.io/ls1intum/theia/swift build-args: | @@ -31,6 +31,8 @@ jobs: "SWIFTLINT_VERSION=0.54.0" - docker-file: images/c/ToolDockerfile image-name: ghcr.io/ls1intum/theia/c + - docker-file: images/ocaml/ToolDockerfile + image-name: ghcr.io/ls1intum/theia/ocaml uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@main with: docker-file: ${{ matrix.docker-file }} diff --git a/images/README.md b/images/README.md index 039036182..03a61431d 100644 --- a/images/README.md +++ b/images/README.md @@ -6,12 +6,12 @@ Matching Artemis' programming environments, the following images are available: - [ ] Java 17-21 - [ ] Kotlin - [ ] Python -- [ ] C +- [x] C - [ ] Haskell - [ ] VHDL - [ ] Assembler - [x] Swift -- [ ] Ocaml +- [x] Ocaml ## Structure of Images Our used Theia IDE Images are built in 3 steps @@ -30,3 +30,8 @@ For overwriting default Theia configuration files, a simple directory can be cre For example, for the image `images/base-ide/`, there is a `package.json`. Using `COPY images/base-ide/ .` in the Dockerfile will replace the default `package.json` of Theia. Creating more files in sub-directories (`images/base-ide/test/test.json`) will also overwrite existing files recursively. +## Choosing the correct plugins +Plugins are an easy way to add functionality to the basic features of VSC or the minimal `base-ide` image. To configure the download step of the `plugin-image` (currently incorporated in the `ToolDockerfile`), you may change the `theiaPlugins` array of the `package.json` inside of your image's folder (`/images//package.json`). Why donĀ“t you start finding appropriate plugins [here](https://open-vsx.org/)? + +### Configuring Theia's VSC built-ins +Theia offers a large built-in plugin bundling all those (82) functions and languages that VSC offers out of the box (https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.88.1/file/eclipse-theia.builtin-extension-pack-1.88.1.vsix). As your image most likely will not require all those features, you can remove sub-plugins by adding their `id` to the list of `theiaPluginsExcludeIds` of the `package.json`. You can find the list of all excluded plugins in the `/images/base-ide/package.json`. diff --git a/images/base-ide/package.json b/images/base-ide/package.json index 51674973b..69635a9ae 100644 --- a/images/base-ide/package.json +++ b/images/base-ide/package.json @@ -59,6 +59,7 @@ }, "theiaPluginsDir": "plugins", "theiaPlugins": { + "eclipse-theia.builtin-extension-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.88.1/file/eclipse-theia.builtin-extension-pack-1.88.1.vsix" }, "theiaPluginsExcludeIds": [ "ms-vscode.js-debug-companion", @@ -68,7 +69,78 @@ "vscode.github", "vscode.github-authentication", "vscode.ipynb", - "vscode.microsoft-authentication" + "vscode.microsoft-authentication", + + "ms-vscode.js-debug", + "vscode.bat", + "vscode.clojure", + "vscode.coffeescript", + "vscode.configuration-editing", + "vscode.cpp", + "vscode.csharp", + "vscode.css", + "vscode.css-language-features", + "vscode.dart", + "vscode.debug-auto-launch", + "vscode.debug-server-ready", + "vscode.docker", + "vscode.emmet", + "vscode.fsharp", + "vscode.go", + "vscode.groovy", + "vscode.grunt", + "vscode.gulp", + "vscode.handlebars", + "vscode.hlsl", + "vscode.html", + "vscode.html-language-features", + "vscode.ini", + "vscode.jake", + "vscode.java", + "vscode.javascript", + "vscode.julia", + "vscode.latex", + "vscode.less", + "vscode.lua", + "vscode.make", + "vscode.npm", + "vscode.objective-c", + "vscode.perl", + "vscode.php", + "vscode.php-language-features", + "vscode.powershell", + "vscode.pug", + "vscode.python", + "vscode.r", + "vscode.razor", + "vscode.references-view", + "vscode.restructuredtext", + "vscode.ruby", + "vscode.rust", + "vscode.scss", + "vscode.shaderlab", + "vscode.shellscript", + "vscode.simple-browser", + "vscode.sql", + "vscode.swift", + "vscode.theme-abyss", + "vscode.theme-defaults", + "vscode.theme-kimbie-dark", + "vscode.theme-monokai", + "vscode.theme-monokai-dimmed", + "vscode.theme-quietlight", + "vscode.theme-red", + "vscode.theme-solarized-dark", + "vscode.theme-solarized-light", + "vscode.theme-tomorrow-night-blue", + "vscode.tunnel-forwarding", + "vscode.theme", + "vscode.typescript", + "vscode.typescript-language-features", + "vscode.vb", + "vscode.vscode-theme-seti", + "vscode.xml", + "vscode.yaml" ], "workspaces": [ "applications/*", diff --git a/images/c/package.json b/images/c/package.json index c27570a4a..134e9c955 100644 --- a/images/c/package.json +++ b/images/c/package.json @@ -25,7 +25,7 @@ }, "theiaPluginsDir": "plugins", "theiaPlugins": { - "cc++-language-built-ins": "https://open-vsx.org/api/vscode/cpp/1.88.1/file/vscode.cpp-1.88.1.vsix", + "eclipse-theia.builtin-extension-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.88.1/file/eclipse-theia.builtin-extension-pack-1.88.1.vsix", "MakefileTools": "https://open-vsx.org/api/ms-vscode/makefile-tools/0.9.10/file/ms-vscode.makefile-tools-0.9.10.vsix" }, "theiaPluginsExcludeIds": [ @@ -36,6 +36,74 @@ "vscode.github", "vscode.github-authentication", "vscode.ipynb", - "vscode.microsoft-authentication" + "vscode.microsoft-authentication", + + "ms-vscode.js-debug", + "vscode.bat", + "vscode.clojure", + "vscode.coffeescript", + "vscode.configuration-editing", + "vscode.css", + "vscode.css-language-features", + "vscode.dart", + "vscode.debug-auto-launch", + "vscode.debug-server-ready", + "vscode.docker", + "vscode.emmet", + "vscode.fsharp", + "vscode.go", + "vscode.groovy", + "vscode.grunt", + "vscode.gulp", + "vscode.handlebars", + "vscode.hlsl", + "vscode.html", + "vscode.html-language-features", + "vscode.ini", + "vscode.jake", + "vscode.java", + "vscode.javascript", + "vscode.julia", + "vscode.latex", + "vscode.less", + "vscode.lua", + "vscode.npm", + "vscode.objective-c", + "vscode.perl", + "vscode.php", + "vscode.php-language-features", + "vscode.powershell", + "vscode.pug", + "vscode.python", + "vscode.r", + "vscode.razor", + "vscode.references-view", + "vscode.restructuredtext", + "vscode.ruby", + "vscode.rust", + "vscode.scss", + "vscode.shaderlab", + "vscode.shellscript", + "vscode.simple-browser", + "vscode.sql", + "vscode.swift", + "vscode.theme-abyss", + "vscode.theme-defaults", + "vscode.theme-kimbie-dark", + "vscode.theme-monokai", + "vscode.theme-monokai-dimmed", + "vscode.theme-quietlight", + "vscode.theme-red", + "vscode.theme-solarized-dark", + "vscode.theme-solarized-light", + "vscode.theme-tomorrow-night-blue", + "vscode.tunnel-forwarding", + "vscode.theme", + "vscode.typescript", + "vscode.typescript-language-features", + "vscode.vb", + "vscode.vscode-theme-seti", + "vscode.xml", + "vscode.yaml" ] } \ No newline at end of file diff --git a/images/java17-21/ToolDockerfile b/images/java-17/ToolDockerfile similarity index 100% rename from images/java17-21/ToolDockerfile rename to images/java-17/ToolDockerfile diff --git a/images/java17-21/package.json b/images/java-17/package.json similarity index 100% rename from images/java17-21/package.json rename to images/java-17/package.json diff --git a/images/swift/package.json b/images/swift/package.json index 2b9e5e370..ad9ca2f1b 100644 --- a/images/swift/package.json +++ b/images/swift/package.json @@ -26,8 +26,7 @@ }, "theiaPluginsDir": "plugins", "theiaPlugins": { - "swift-language-basics": "https://open-vsx.org/api/vscode/swift/1.88.1/file/vscode.swift-1.88.1.vsix", - "swift": "https://open-vsx.org/api/sswg/swift-lang/1.10.2/file/sswg.swift-lang-1.10.2.vsix", + "eclipse-theia.builtin-extension-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.88.1/file/eclipse-theia.builtin-extension-pack-1.88.1.vsix", "swiftlint-vsc": "https://open-vsx.org/api/vknabel/vscode-swiftlint/1.8.4/file/vknabel.vscode-swiftlint-1.8.4.vsix" }, "theiaPluginsExcludeIds": [ @@ -38,6 +37,76 @@ "vscode.github", "vscode.github-authentication", "vscode.ipynb", - "vscode.microsoft-authentication" + "vscode.microsoft-authentication", + + "ms-vscode.js-debug", + "vscode.bat", + "vscode.clojure", + "vscode.coffeescript", + "vscode.configuration-editing", + "vscode.cpp", + "vscode.csharp", + "vscode.css", + "vscode.css-language-features", + "vscode.dart", + "vscode.debug-auto-launch", + "vscode.debug-server-ready", + "vscode.docker", + "vscode.emmet", + "vscode.fsharp", + "vscode.go", + "vscode.groovy", + "vscode.grunt", + "vscode.gulp", + "vscode.handlebars", + "vscode.hlsl", + "vscode.html", + "vscode.html-language-features", + "vscode.ini", + "vscode.jake", + "vscode.java", + "vscode.javascript", + "vscode.julia", + "vscode.latex", + "vscode.less", + "vscode.lua", + "vscode.make", + "vscode.npm", + "vscode.objective-c", + "vscode.perl", + "vscode.php", + "vscode.php-language-features", + "vscode.powershell", + "vscode.pug", + "vscode.python", + "vscode.r", + "vscode.razor", + "vscode.references-view", + "vscode.restructuredtext", + "vscode.ruby", + "vscode.rust", + "vscode.scss", + "vscode.shaderlab", + "vscode.shellscript", + "vscode.simple-browser", + "vscode.sql", + "vscode.theme-abyss", + "vscode.theme-defaults", + "vscode.theme-kimbie-dark", + "vscode.theme-monokai", + "vscode.theme-monokai-dimmed", + "vscode.theme-quietlight", + "vscode.theme-red", + "vscode.theme-solarized-dark", + "vscode.theme-solarized-light", + "vscode.theme-tomorrow-night-blue", + "vscode.tunnel-forwarding", + "vscode.theme", + "vscode.typescript", + "vscode.typescript-language-features", + "vscode.vb", + "vscode.vscode-theme-seti", + "vscode.xml", + "vscode.yaml" ] } \ No newline at end of file