Creating a custom Theia-based code-editor

Hello, community

Hope everyone is safe and doing well.

I am somebody who’s greatly involved in competitive programming and wanted to create a specialized code editor for this purpose. So a few months ago I started learning the required tech stack and created a prototype of the code editor I desired. The whole idea of the editor is to ease out the repetitive tasks involved while participating in a programming competition and provide a toolset for performing some special tasks. A somewhat complete list of features can be found here. Also, I created a preview video which shows some of the features. The GitHub repository for the project is here.

The problem with the existing project is that I don’t feel it’s well designed and it has some issues which require a lot of changes. Now that I discovered Theia, I want to re-create this project using Theia. Here are a couple of questions that I have in my mind for now:

  • Is Theia a good fit for this project? or Will it be an overkill? Given that the codes written by the user are generally less than 300 lines and a single file. The user needs to run the compiled code multiple times against some test cases and so this needs to be fast. I tried to write a vscode extension instead but I felt that it has some restrictions for what I wanted to achieve. The existing editors and IDEs are not suitable for this and people have been using all kinds of hacks to make something better.

  • All the products that use theia has the same kind of UI. Is it possible to change the application shell significantly? I have seen people creating some cool UI using a vscode fork like these.

With this, I also wish to get myself familiar with the theia project and contribute to it. The people here are so good :D. Also please provide me some pointers on how I can improve the overall project if I use theia.

[original thread by Harshal Nandigramwar]

If you just need a single terminal, a single file view with syntax highlighting and preview of results Theia can be overkill. If you need multi files support, cross file navigations, VS Code extension powered smartness then Theia can be a good choice.

You certainly can customize Theia shell and remove stuff, but it is a lot of work especially if you need VS Code extensions, since the plugin system basically use everything. So you cannot simply remove package like outline, but you have to rebind the outline contribution and stub register function that does nothing.

[Harshal Nandigramwar]

Its now exactly a single terminal, single file view. To give some context, its like there are few problems given in a competition. So for each problem there is an editor model, a terminal and a debug or test console. Now as I switch to other problem there should a fresh new context (new terminal, new editor model, new test and debug console). And also the state of each context should be preserved between switches.

[Harshal Nandigramwar]

I’m not familiar with the architecture, but initially I assumed I could add each theia package as a dependnecy and write a custom core that interfaces with the package.

[Harshal Nandigramwar]

I’m not sure if that makes sense though :slight_smile:

[Harshal Nandigramwar]

Okay I get this.

Maybe you are better to use Monaco + monaco languageclient + xterm.js. Theia does not solve the issue of supporting multiple users and persisting their contexts, you will need to solve this issue irrelevant whether you use Theia as an IDE or your own frontend.

[Harshal Nandigramwar]

Ok thanks @anton-kosyakov