Skip to content

Instantly share code, notes, and snippets.

@Michdo93
Forked from ccssmnn/README.md
Last active January 28, 2021 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Michdo93/39ab76af292cd6f6192853d102bfc34d to your computer and use it in GitHub Desktop.
Save Michdo93/39ab76af292cd6f6192853d102bfc34d to your computer and use it in GitHub Desktop.
Theia IDE = ❤️

Set up Theia IDE

Requirements

Install node version 12.14.1 and yarn:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
source ~/.bashrc
nvm install 12.14.1
nvm use v12.14.1
npm install -g yarn
sudo apt-get install build-essential
sudo apt-get install libx11-dev libxkbfile-dev

Setup

Create a project directory for your theia-ide

mkdir theia-ide
cd theia-ide

Add a package.json:

{
  "private": true,
  "name": "@theia/<name>",
  "version": "1.9.0",
  "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
  "theia": {
    "frontend": {
      "config": {
        "applicationName": "Theia <Name>",
        "preferences": {
          "files.enableTrash": false
        }
      }
    }
  },
  "dependencies": {
    "@theia/callhierarchy": "^1.9.0",
    "@theia/console": "^1.9.0",
    "@theia/core": "^1.9.0",
    "@theia/debug": "^1.9.0",
    "@theia/editor": "^1.9.0",
    "@theia/editor-preview": "^1.9.0",
    "@theia/file-search": "^1.9.0",
    "@theia/filesystem": "^1.9.0",
    "@theia/getting-started": "^1.9.0",
    "@theia/git": "^1.9.0",
    "@theia/keymaps": "^1.9.0",
    "@theia/markers": "^1.9.0",
    "@theia/messages": "^1.9.0",
    "@theia/metrics": "^1.9.0",
    "@theia/mini-browser": "^1.9.0",
    "@theia/monaco": "^1.9.0",
    "@theia/navigator": "^1.9.0",
    "@theia/outline-view": "^1.9.0",
    "@theia/output": "^1.9.0",
    "@theia/plugin-dev": "^1.9.0",
    "@theia/plugin-ext": "^1.9.0",
    "@theia/plugin-ext-vscode": "^1.9.0",
    "@theia/plugin-metrics": "^1.9.0",
    "@theia/preferences": "^1.9.0",
    "@theia/preview": "^1.9.0",
    "@theia/process": "^1.9.0",
    "@theia/scm": "^1.9.0",
    "@theia/scm-extra": "^1.9.0",
    "@theia/search-in-workspace": "^1.9.0",
    "@theia/task": "^1.9.0",
    "@theia/terminal": "^1.9.0",
    "@theia/timeline": "^1.9.0",
    "@theia/typehierarchy": "^1.9.0",
    "@theia/userstorage": "^1.9.0",
    "@theia/variable-resolver": "^1.9.0",
    "@theia/vsx-registry": "^1.9.0",
    "@theia/workspace": "^1.9.0"
  },
  "devDependencies": {
    "@theia/cli": "^1.9.0"
  }
}

Building

Install dependencies by running

npm install
yarn

On my RPi4 this took about 5 minutes. Then build the app with

yarn theia build

which took about 6 minutes on my RPi4.

Extensions

You can download the .vsix files from the extensions you use in the VSCode Marketplace. In the project directory create a directory plugin and place the downloaded files into it.

Running

Run your IDE with:

nvm 12.14.1 yarn --cwd /path/to/theia-ide run start /path/to/workspace --plugins=local-dir:plugin --hostname 0.0.0.0 --port 3000

Access the IDE from another device at <public-device-ip>:3000 or on the Device itself at localhost:3000 or 127.0.0.1:3000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment