stylelint / vscode-stylelint

The official Visual Studio Code extension for Stylelint
https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
MIT License
315 stars 29 forks source link

Publish server part as a separate stylelint-language-server #110

Open rchl opened 4 years ago

rchl commented 4 years ago

What is the problem you're trying to solve?

LSP servers by definition should be easy to reuse in various editors, without being locked-in to any specific one. A stylelint server was created for this extension but it's locked-in to the vscode extension only.

What solution would you like to see?

Extract the server part into a separate repo and publish as a npm package (for example stylelint-language-server). That would make it easy for both this extension to depend on it and for other editors to start using it.

(I've adapted this server to work with Sublime Text editor (see related PR at https://github.com/sublimelsp/LSP-vscode-stylelint/pull/1) but it requires some extra work that shouldn't be necessary.)

ota-meshi commented 4 years ago

It sounds good to me. But I don't know what work is needed. Can you help? If you want to publish a new package, I think we need help from @jeddy3.

rchl commented 4 years ago

The first step would be separating the server into a separate repo. Or use monorepo. Whatever is a personal preference.

Then:

ota-meshi commented 4 years ago

I think it's difficult to separate the repo, because I think it's probably difficult to separate test codes. So I think it's better to use monorepo.

rchl commented 4 years ago

Personally I think working with monorepos is a pain.

I think another option is to just put server code in a separate directory (like server) that would have its own package.json and could be released to npm from that directory. One example of such setup is https://github.com/microsoft/vscode-eslint which is also a VS extension and language server in one repo

jeddy3 commented 4 years ago

If you want to publish a new package, I think we need help from @jeddy3.

I've added you to the stylelint npm org so that you can publish packages under the @stylelint scope. If you publish an unscoped package, invite jeddy3, ntwb and hudochenkov to it. (Preference would be for a scoped package.)

I think another option is to just put server code in a separate directory (like server) that would have its own package.json and could be released to npm from that directory.

That approach must have merit if the Microsoft team do for their ESLint extension.

rchl commented 4 years ago

I've kick-started the progress with https://github.com/stylelint/vscode-stylelint/pull/141

adalinesimonian commented 2 years ago

265 refactors the project from the ground up into a new modular architecture that makes it way easier to split off the server into its own package. I'd like to get some traction on this issue once the v1 release has had time for the dust to settle and we've spent whatever time we may need to spend squashing bugs.

adalinesimonian commented 2 years ago

I'm considering splitting the language server into a proper package in v1.2 since the refactored codebase in v1.2 makes it much easier to do this. However, I'm not certain yet, as I already have a lot of work cut out for me. If it makes it into v1.2, this issue will be added to the v1.2 project.

rchl commented 2 years ago

Thank you for the update.

BBboy01 commented 4 months ago

is there any progress?