-
Notifications
You must be signed in to change notification settings - Fork 264
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
Extract YAML language service to another repo? #104
Comments
@gorkem @fbricon WDYT? If i'm understanding this correctly I think the pros are that it helps monaco-yaml but on the flip side it seems like we add another level of indirection for users to report issues and this repo would literally just have the server.ts file and include that new dependency. It would still enable it to be its own standalone node js application but this repo would essentially become a shell. |
Can't we just publish the server to npm? That should be enough for adopters to depend on it, I don't think it'd require splitting the git repos. |
mmm it's already available https://www.npmjs.com/package/yaml-language-server |
@fbricon it is, but the released bundle is not in a shape which can be imported into a js application statically as a ts lib. |
ok so the npm module must also contain the ts type definitions. I don't know how everything is published to npm, but I guess that's irrelevant, as long as the build script includes those definitions that should be ok. @pengx17 feel free to provide a PR |
Will make one PR for this later. |
With #305 this should be solved. |
As far as I know, yaml-language-server was invented to make a YAML plugin for code editors (especially vscode), and it is running as a standalone Node.js application in the extension.
To make it running inside of monaco-editor, the yaml language service has to be imported as a module dependency statically with UMD or ESM. What we are doing currently in monaco-yaml here is to copy
/src/languageservice/*
into our repo as a native module which then could be statically imported, and finally to be built with tsc/vscode bundle helpers. This is clearly not a clean solution.A better solution in my opinion is to extract the yaml language service into a new repo and publish it into
vscode-yaml-language-service
. Then both vscode-yaml-languageserver(this repo) and monaco-yaml could depend on it.What do you think?
The text was updated successfully, but these errors were encountered: