Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] gitpod integration #2845

Closed
yyoncho opened this issue May 7, 2021 · 14 comments
Closed

[feature] gitpod integration #2845

yyoncho opened this issue May 7, 2021 · 14 comments

Comments

@yyoncho
Copy link
Member

yyoncho commented May 7, 2021

It will be interesting to explore the posibility of running emacs+lsp-mode+ in gitpod environment. This will allow the new users to explore the possibilities of Emacs with one click.

https://www.gitpod.io/

@ghuntley
Copy link

ghuntley commented May 7, 2021

Howdy @yyoncho (or whomever) picks this up. I'm Geoff from Gitpod. 👋

One of the issues that we face at lsp-mode side is that it is hard to obtain/configure the environment outside of emacs. In emacs, it works pretty much out of the box. We have created automatic installation for some of the language servers but we don't have the manpower to do it for all servers(it pretty much needs a person familiar with the particular language for each server).

So Gitpod is basically k8, you get a workspace (a k8 pod) and thus everything is a docker image with git clone overlaid. Right now the implementation is opening a visual editor of vscode to access filesystem as the IDE. Gitpod is more than vscode, it's about a docker execution environment. This means - switching out the IDE with another IDE (inc emacs) is something we want to do in the future.

In practice that means

  • click button on Gitpod to open workspace/clone in Gitpod
  • Gitpod launches fullscreen xtermjs terminal or x11 rendered in a webbrowser
  • user supplied docker image with emacs config (Gitpod will build it ci/cd style + docker registry)
  • <that's it. nothing special>

ie.

FROM mcr.microsoft.com/dotnet/sdk:5.0
RUN APT-GET INSTALL emacs
<overlay emacs config>
<steps for lsp-mode>

Happy to pair with you to help solve above - https://ghuntley.com/meet

@yyoncho
Copy link
Member Author

yyoncho commented May 25, 2021

I spent quite some time working on the issue and here it is the current status:

  1. Partially working configuration using xtermjs - https://gitpod.io/#https://github.com/yyoncho/lsp-gitpod3 - after you click the link and wait gitpod in the right corner you will see a popup - click open in browser and you will see terminal in the browser in which you can start emacs.

  2. Waiting for reply to Support custom IDEs provided through docker images gitpod-io/gitpod#2419 (comment) - once we have an answer - we will be able to show directly the xtermjs window without having the default IDE.

  3. Lastly - Websocket connections no longer work gitpod-io/gitpod#4047 - this prevent us from using gtk broadway which I have tested locally and works well with pgtk branch.

It will be great if someone with TS skills extracts https://github.com/xtermjs/xterm.js/tree/master/demo into separate project.

Once these issues are sorted out we might start working on creating containers with language servers.

@yyoncho
Copy link
Member Author

yyoncho commented Jun 13, 2021

Here it is what we have now: https://www.youtube.com/watch?v=IROIt1Y-xqs

The next step is to provide the actual ide experience.

@BillDStrong
Copy link

This looks very cool. What plans do you have for, say, dot files? Will we be able to install Doom, Spacmacs etc.?

@ericdallo
Copy link
Member

That's one of the ideas @BillDStrong :) allow user choose its elisp config or use some base framework!

@yyoncho
Copy link
Member Author

yyoncho commented Jun 14, 2021

This looks very cool. What plans do you have for, say, dot files? Will we be able to install Doom, Spacmacs etc.?

@BillDStrong doom/spacemacs will be supported ootb (e. g. by providing a flag in the url).

@yyoncho
Copy link
Member Author

yyoncho commented Jul 2, 2021

I am working on this here: https://github.com/emacs-lsp/lsp-gitpod

To try it you may open (make sure to open the popup or prefix the vscode url with 8080- but keep the vscode tab open)

Vanilla:
https://gitpod.io/#PROFILE=vanilla/https://github.com/emacs-lsp/lsp-gitpod
Spacemacs:
https://gitpod.io/#PROFILE=spacemacs/https://github.com/emacs-lsp/lsp-gitpod

I am working with gitpod team team to solve the usability issues(e. g. removing the need to keep vscode tab open and adding the ability to open any GH project)

@ghuntley
Copy link

ghuntley commented Jul 5, 2021

Seriously cool.

2021-07-05_10-00-35

@ericdallo
Copy link
Member

@ghuntley, @yyoncho worked hard to make it work that way :)

@ghuntley
Copy link

Using broadway/gtk like this is magical. Keep going back to this and citing your work @yyoncho.

@ericdallo ericdallo moved this from To do to In progress in lsp-mode Sep 4, 2021
@ericdallo ericdallo modified the milestones: 8.0.0, Next release Sep 7, 2021
@jfmc
Copy link

jfmc commented Sep 15, 2021

It looks great!

Is there any hope to compile emacs (or emacsclient?) and broadway/gtk to webassembly so that it runs client-side? (AFAIK VSCode runs entirely on the browser)

@yyoncho
Copy link
Member Author

yyoncho commented Sep 23, 2021

https://gitpod.io/#ORG=serde-rs,PROJECT=json/https://github.com/yyoncho/lsp-gitpod - here it is WIP for being able to open a particular GH project(in this case serde-rs/json). Click the link, wait for gitpod to pick lsp-gitpod image, and then after enabling the popups you will get emacs in the browser with preconfigured lsp-mode with serveral language servers preinstalled.

@brotzeit
Copy link
Member

This works amazingly well.

@yyoncho
Copy link
Member Author

yyoncho commented Sep 27, 2021

Here is a demo: https://www.youtube.com/watch?v=nXRmMO_Rkuo

I am closing the issue, lets move the discussions in https://github.com/emacs-lsp/lsp-gitpod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
lsp-mode
  
Done
Development

No branches or pull requests

6 participants