0.5.0 • Published 2 years ago

@perrinjerome/theia-open v0.5.0

Weekly downloads
11
License
MIT
Repository
-
Last release
2 years ago

theia-open

A theia extension to open files from command line.

This exposes a server side API to open/close and editor and query if the editor is still open and a command line interface.

This is intended to use as an $EDITOR environment variable so that opening files from the terminal (for example with git commit) opens in a theia editor.

This is a reimplementation of a gitpod feature.

Usage

Start theia server with a token set as environment variable THEIA_OPEN_EDITOR_TOKEN. Client will need the same token to connect.

Install client:

npm install -g @perrinjerome/theia-open-cli

Set EDITOR environment variable in the shell, something similar to:

export THEIA_URL=http://localhost:3000
export EDITOR="theia-open --wait"

Demo

# install and build everything
yarn install
yarn build # during development use yarn watch instead

# run the example theia app
cd browser-app
yarn demo

This will start theia on http://localhost:3000 , with the necessary environment variables set (see the demo command in browser-app/package.json).

When running git commands from theia's terminal, theia's text editor will be used instead of a default command line text editor. Try for example: git config --edit --global.

0.5.0

2 years ago

0.4.4

2 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago