-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Use monaco vscode api #373
Conversation
b0c804a
to
ba4959f
Compare
@kaisalmen I think it's ready! |
@CGNonofr wow, that is a huge change. I just briefly looked over the external repo and the changes here and see if I can build everything. That works. 👍 I need to look at it in more detail and test it myself (examples) So, you basically build a vscode extension (external repo) that exposes the vscode api and services, but binds it to existing monaco-editor functionality or let's users implement missing things if required? Some additional words could be helpful. 😊 Do you want to move the content external repo in here as a sub-package once we think it is ready? |
It's not a vscode extension! It's an implementation of the vscode API.
It's pretty similar to what the
I don't think it would make a lot of sense to put everything in a big monorepo, the other project can be used for something else that this library (you can run vscode extension code on monaco with it) Btw, I'll probably improve the documentation |
ba4959f
to
8e2f75b
Compare
Thanks for the clarifications. I misunderstood some things and did not look closely enough at the new repo yesterday.
I think the overall approach is better. 👍 It will also ease maintenance of the lib and make integration easier for users, I think.
Somewhat true, but it also remove 90% of the code from this repo. Having one repo doesn't hinder us from releasing different npm packages at different speeds and it doesn't prevent anyone from using a specific npm package.
Do you already have a proof of concept for that? Do you plan on using this at Codingame? |
True, there is still some potential issues (see the repo issues) I need to address. Also we need some CI on it (I can't just put semantic-release as we'll probably want the lib version to match the vscode api version)
True, is it an issue? this repo can focus on the language client tweaks, examples and documentations. Also, it will stay the "visible" part for any user, the other lib is just a dependency.
We already use almost all declarative parts of vscode extensions at CG in monaco-editor-wrapper (everything in the package.json: grammars, languages, configurations, snippets, themes, semantic tokens...). For some of them, some code is required to make the language client work at 100% (for instance, the jdt.ls LSP doesn't use the protocol for inlayHint and requires some client code, so we don't have the feature right now) |
I would like to merge all other PRs and make a 1.1.0 release and then do this one with a next release (even a 2.0.0)? |
Sure! It's a big change, let's release a version with the small fixes first. I'll probably try to resolve the few issues on This PR was mainly to gather some feedback but it's not urgent to merge it, we better well test it first. We can probably release a |
I looked at the new lib a bit more closely to understand some of the magic (e.g. rollup part). So, you did not really extract the What For testing purposes I created a new esm bundle of The node client examples works fine, btw. But, shouldn't we keep the |
I'm not sure to understand what you mean, it doesn't behave similar to
That's right, it exports all requires classes and tools as well
I'm afraid that if the code is no longer used by the library, it won't be well maintained. But why not! what about making another library out of it though? |
Sorry, that was confusing. |
5218319
to
d60b74d
Compare
Ok, I updated to the just released vscode 1.68 and I think I did solve the issues I had (still not perfect but I don't have any idea on how to improve it) Are you ok to publish a 2.0.0-dev version? |
@CGNonofr Are you ok to publish a 2.0.0-dev version? Will do. Btw, you can do it yourself if you like. You should have all the permissions. |
Here you go: I pushed a small update on this branch (version changes) |
Btw, we're now able to release an esm version of this lib, should we do it in another PR? |
Yes, this is really great. 👍
Let's do it directly here. I can quickly release a new dev version when you need one. You can directly increase the version number, btw. Can you revert the deletion of One more thing: Could you add a note to README of https://github.com/CodinGame/monaco-vscode-api that this repo exists to some part exists because of the lessons you learned here. I know you basically rewrote it/took a different approach, but a link/hint would be fair, I think. |
I'll do it! I have to fix another small issue as well with double re-export
I can! But I think that's a shame to have to maintain it while there is another way that doesn't require any code from this library. Will still do it, we will decide later I guess.
You're completely right, I'll try something! I'll give you the permissions on the repo as well if you want? |
I am not sure about this currently. We could have a two step approach: Keep it mid-term (mark deprecate) and then remove it. Then we should have two browser examples (unchanged old one and the adjusted one from this PR) for people to know how to adapt (just a quick idea)
That's not required right now. I could become a regular contributor at some point 😎 |
22d2391
to
302cdec
Compare
@kaisalmen I've rewritten the history with all the requested changes, can you please check & release the version? :) |
302cdec
to
7589419
Compare
Done! I pushed an update and also fixed some exports because vite complained
be moved from |
Did you push your changes? |
Now, sorry forgot, but the release is available |
A new block was added in the https://github.com/CodinGame/monaco-vscode-api README, is it ok for you? |
Very good, thank you 👍 |
@CGNonofr we should merge this to the main, I think. This makes handling other PRs easier as well. We can put out further 2.0.0 dev or beta releases, so people could play around before making the final 2.0.0 release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm open to any feedback!
It relies on https://github.com/CodinGame/monaco-vscode-api