Skip to content

Instantly share code, notes, and snippets.

@ccssmnn
Created February 9, 2020 12:43
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ccssmnn/592c8846c8fef48232e653f674dce653 to your computer and use it in GitHub Desktop.
Save ccssmnn/592c8846c8fef48232e653f674dce653 to your computer and use it in GitHub Desktop.
Raspberry Pi 4 + Theia IDE = ❤️

Set up Theia IDE on Raspberry Pi 4

Requirements

Install node version 10 and yarn:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
nvm install 10
npm install -g yarn

Setup

Create a project directory for your theia-ide

mkdir my-theia-ide
cd my-theia-ide

Add a package.json:

{
  "private": true,
  "dependencies": {
    "typescript": "latest",
    "@theia/typescript": "next",
    "@theia/tslint": "next",
    "@theia/navigator": "next",
    "@theia/terminal": "next",
    "@theia/outline-view": "next",
    "@theia/preferences": "next",
    "@theia/messages": "next",
    "@theia/git": "next",
    "@theia/file-search": "next",
    "@theia/markers": "next",
    "@theia/preview": "next",
    "@theia/callhierarchy": "next",
    "@theia/merge-conflicts": "next",
    "@theia/search-in-workspace": "next",
    "@theia/json": "next",
    "@theia/textmate-grammars": "next",
    "@theia/mini-browser": "next",
    "@theia/plugin-ext-vscode": "next"
  },
  "devDependencies": {
    "@theia/cli": "next"
  }
}

Building

Install dependencies by running

yarn

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

yarh 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:

yarn theia start /path/to/workspace --plugins=local-dir:plugin --hostname 0.0.0.0 --port 3000

Access the IDE from another device at raspberrypi.local:3000 or on the Pi itself at localhost:3000

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