-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Consuming Builtin and External VS Code Extensions
Vincent Fugnitto edited this page Mar 8, 2020
·
4 revisions
The project has made substantial efforts in improving VS Code extension support. For this reason, language-specific extensions in Theia are deprecated and are instead replaced by builtin VS Code extensions. The main reasons for using pre-existing extensions are the following:
- Increased functionality (including new commands, preferences, features).
- Better support (VS Code are the contributors for the builtins and the extensions are well tested and feature-rich).
- Less overall maintenance for the project.
The following are migration steps for any applications who wish to use builtin extensions:
- Remove any deprecated extensions (extensions listed in the following pull-request should be removed unless maintained by external sources.
- Include the necessary
plugin
dependencies:
"@theia/plugin-dev": "latest",
"@theia/plugin-ext": "latest",
"@theia/plugin-ext-vscode": "latest",
- In your application's
package.json
, you can add the location of where you want plugins to be located (the default value isplugins
):
"theiaPluginsDir": "plugins",
- In your application's
package.json
, you can list the plugins you want to be downloaded by providing a unique quantifier and a URL location (for example, the project uses.vsix
files published under a repo's GitHub releases tab)
"theiaPlugins": {
"vscode-builtin-bat": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/bat-1.39.1-prel.vsix",
"vscode-builtin-clojure": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/clojure-1.39.1-prel.vsix",
"vscode-builtin-coffeescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/coffeescript-1.39.1-prel.vsix",
"vscode-builtin-configuration-editing": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix",
"vscode-builtin-cpp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/cpp-1.39.1-prel.vsix",
"vscode-builtin-csharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/csharp-1.39.1-prel.vsix"
}
- Plugins can be downloaded using the new
theia download:plugins
script provided by the@theia/cli
extension. For example:
"scripts": {
"prepare": "yarn build && yarn download:plugins",
"build": "theia rebuild:electron && theia build",
"start": "electron scripts/theia-electron-main.js",
"package": "electron-builder",
"package:preview": "electron-builder --dir",
"download:plugins": "theia download:plugins"
},
-
The plugins directory must be referenced so the application can successfully locate them.
There are two approaches to satisfy the lookup:- Use the
THEIA_DEFAULT_PLUGINS
environment variable:
export THEIA_DEFAULT_PLUGINS=local-dir://absolute-path-to-plugins-folder
- Use the command line option:
theia start --plugins=local-dir:../../plugins
- Use the
You can also take a look at examples from theia-apps as images have been updated to include builtin and external extensions.
Project Management
- Roadmap
- Dev Meetings
- Technical Meetings
- Community Call
- Intellectual Property (IP) guide
- Registering CQs (Deprecated)
Documentation