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

[Suggestion]: separate vetur server to a standalone package #168

Closed
HerringtonDarkholme opened this issue May 1, 2017 · 7 comments
Closed

Comments

@HerringtonDarkholme
Copy link
Member

Vetur is a great vscode plugin. And its implementation has already in par with language server protocol.

It would be even greater if server code can be separated into a standalone package so other editor users can share this great language service via language service client.

@octref
Copy link
Member

octref commented May 1, 2017

Never really took time to move stuff to vls.

Will look into doing it while doing #145 this weekend.

@HerringtonDarkholme
Copy link
Member Author

Hi @octref . I have extracted vetur server into a separate repo.

https://github.com/HerringtonDarkholme/vue-language-server

Is this fine?

@octref
Copy link
Member

octref commented Jun 1, 2017

That's fine, but I'm wondering how you are gonna update it as I update the code for the server.

Now after a while I think I should just close the repo https://github.com/octref/vls and merge it back to vetur, so I can deal with all issues at the same place.
Meanwhile I'll keep all language server in /server and find a way to distribute it.

@octref
Copy link
Member

octref commented Jun 3, 2017

I deprecated vls and put the code under /server.
The main reason is for vetur to do template IntelliSense / type check etc, it's much easier to just put html/js mode together.
I'm thinking the best way to let vetur's LS reused by other editors is to put https://github.com/octref/vetur/blob/master/server/src/htmlServerMain.ts#L148-L254 as a module.

@HerringtonDarkholme
Copy link
Member Author

I finally decided to fork out vetur server. Some progress here:

  1. enabled strict type checking so the code itself is more robust
  2. fixed test case and improved test infra, now mocha is with source map support
  3. Vue component tag and attribute documentation is added

@HerringtonDarkholme
Copy link
Member Author

HerringtonDarkholme commented Jun 7, 2017

I have tried to use a local version of vue language server instead of packaged one, after a little change in client.

    var serverOptions = {
        run: { command: "vls" } // suppose vls starts server
    };

It seems to work well. For example, new added tag hover info is displayed seamlessly.
screen shot 2017-06-07 at 6 01 29 pm

stylus support:
screen shot 2017-06-07 at 6 03 24 pm

Would it be an option that let user to configure vetur client to use local vue language server?

@octref
Copy link
Member

octref commented Jun 7, 2017

I don't think that's a good idea, because then I wouldn't know the where the bugs come from.

But good job on the Stylus IntelliSense! Are you thinking about merging or just keep maintaining your fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants