Languageclient-neovim: Using the MSFT CSS / HTML language servers?

Created on 4 Aug 2017  路  7Comments  路  Source: autozimu/LanguageClient-neovim

(Sorry, this isn't an actual bug report, my apologies for breaking format but hoping perhaps someone in the community can answer).

First off, thanks a lot for your effort here in creating this plugin. I've got it working great for JavaScript. I'd like to hook it up for editing CSS files, but I'm hitting a stumbling block.

MSFT has a CSS language server, I'm wondering if anyone else has managed to get it working with this plugin? Does the plugin only support language servers that do stdio?

Most helpful comment

FWIW I just stumbled upon the vscode-langservers organization, which has published binaries (in the "-bin" repos) for the above three services. The binaries each take an --stdio argument. Setting it up with LanguageClient-neovim looks something like this:

$ npm install -g vscode-html-languageserver-bin

Then:

let g:LanguageClient_serverCommands = {
    \ 'html': ['html-languageserver', '--stdio'],
    \ }

It runs without error. I didn't get much farther than that, but I wanted to mention it for anyone else who might be interested.

All 7 comments

I found this implementation, https://github.com/Microsoft/vscode-css-languageservice, which might be closer to your situation.

Either way, it seems some extra work need to be done on language server side, as I don't think currently the server can be started standalone and communicate through stdio or tcp. A simple shim might be sufficient.

For now, this plugin only supports stdio to communicate to language servers.

Thanks for taking the time to answer!

FWIW I just stumbled upon the vscode-langservers organization, which has published binaries (in the "-bin" repos) for the above three services. The binaries each take an --stdio argument. Setting it up with LanguageClient-neovim looks something like this:

$ npm install -g vscode-html-languageserver-bin

Then:

let g:LanguageClient_serverCommands = {
    \ 'html': ['html-languageserver', '--stdio'],
    \ }

It runs without error. I didn't get much farther than that, but I wanted to mention it for anyone else who might be interested.

That's neat! Thanks for sharing.

Great find @jrunning - thanks!

@jrunning @fortes I'm the owner of vscode-langservers, for the moment it's WIP because completion need snippet support for the client so you only have diagnostics for the moment but I will notify you when it will be ready ;)

Was this page helpful?
0 / 5 - 0 ratings