Lsp-mode: Support vscode-html-languageservice

Created on 26 Oct 2020  路  9Comments  路  Source: emacs-lsp/lsp-mode

@jsmestad mentioned this on Gitter. This should be an upgrade over the languageserver-bin we currently support, though it doesn't look like it puts an executable in any place that would reasonably be expected to be in PATH; the file structure we get after npm i -g vscode-html-languageservice seems similar to that of the angular-language-service we currently support.

https://github.com/Microsoft/vscode-html-languageservice

good-first-issue hacktoberfest new server

All 9 comments

I'd love to tackle this if anyone has any ideas how to get a binary out of the new service.

Also it looks like there are several other language services from MS we can update too like css

I'd love to tackle this if anyone has any ideas how to get a binary out of the new service.

After installing, it looks like we get some .js and .ts files that we can run with Node. In lsp-angular.el we have to do something similar.

Isn't Microsoft/vscode-html-languageservice already one of the language service being use by vscode-langservers/vscode-html-languageserver?

Isn't Microsoft/vscode-html-languageservice already one of the language service being use by vscode-langservers/vscode-html-languageserver?

Right now we seem to be using vscode-html-languageserver-bin, which hasn't been updated in a while.

My bad I thought it was using vscode-langservers/vscode-html-languageserver directly.

I made SebastienWae/vscode-html-ls-bin to replace vscode-html-languageserver-bin then, it's building the html language server directly form the vscode repo.


edit: here is SebastienWae/vscode-css-ls-bin and SebastienWae/vscode-json-ls-bin

@leungbk @yyoncho how would be go about replacing the existing LSP clients with these new ones?


@SebastienWae would it make sense to expose these new libraries as the same binary names so it's a drop-in replacement for the existing binaries that LSP expects?

I sent an email to the vscode-langservers maintainer, since it would be easier to keep using the same project. Hopefully I'll have an answer quickly.

@jsmestad I don't think it's a good idea to use the same binary name, however if you do not want to wait you can uninstall the current ones, clone my repos (with the --recursive flag), edit the bin parameter in the package.json then npm run compile and npm install -g /path/to/the/repo.

I sent an email to the vscode-langservers maintainer, since it would be easier to keep using the same project. Hopefully I'll have an answer quickly.

@jsmestad I don't think it's a good idea to use the same binary name, however if you do not want to wait you can uninstall the current ones, clone my repos (with the --recursive flag), edit the bin parameter in the package.json then npm run compile and npm install -g /path/to/the/repo.

Yeah I think I could also use a symlink to get things working as-is in lsp-mode. Do you know how to find out what LSP features these new binaries support compared with the old ones? I wouldn't be surprised to see new functionality we can take advantage of

Here are some of the updates I have noted.

HTML:

  • custom data support
  • semantic selection
  • details and link for ARIA attributes
  • MDN Reference link
  • tag rename on type

CSS:

  • custom data support
  • semantic selection
  • better support for file/module import
  • better documentation
  • MDN Reference link
  • deprecation warning
  • completion with semicolon

JSON:

  • custom data support
  • semantic selection
Was this page helpful?
0 / 5 - 0 ratings