]> git.eshelyaron.com Git - emacs.git/commitdiff
Add up-to-date server executables for html/css/json
authorBrian Leung <bkleung89@gmail.com>
Sun, 9 Jan 2022 01:43:23 +0000 (17:43 -0800)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 9 Jan 2022 23:27:23 +0000 (00:27 +0100)
* README.md: Advertise updated executables.
* eglot.el (eglot-server-programs): Prioritize the alternatives.

The {html,css,json}-languageserver executables that are distributed
outside VS Code are not regularly updated by Microsoft; any relevant
updates to the VS Code source tree reach VS Code users without the
need for VS Code developers to go out of their way to publish new
versions of the executables. Consequently, users of other editors who
have been using the server executables from the most obvious NPM
packages are likely using stale versions.

@hrsh7th, a Vim user, created an NPM package with updated versions of these
executables taken straight from VS Code's source tree. We therefore
prefer to direct users to the corresponding repo, which contains
appropriate installation instructions, in the README.

lisp/progmodes/eglot.el

index 2a8000cce3f25f3ed01cfb3e8e0a1d525c8bf632..ef9b371af893db1d4472d00b1fad3a68b2c16e16 100644 (file)
@@ -182,9 +182,9 @@ language-server/bin/php-language-server.php"))
                                 ((fortran-mode f90-mode) . ("fortls"))
                                 (lua-mode . ("lua-lsp"))
                                 (zig-mode . ("zls"))
-                                (css-mode "css-languageserver" "--stdio")
-                                (html-mode "html-languageserver" "--stdio")
-                                (json-mode "json-languageserver" "--stdio")
+                                (css-mode . ,(eglot-alternatives '(("vscode-css-language-server" "--stdio") ("css-languageserver" "--stdio"))))
+                                (html-mode . ,(eglot-alternatives '(("vscode-html-language-server" "--stdio") ("html-languageserver" "--stdio"))))
+                                (json-mode . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") ("json-languageserver" "--stdio"))))
                                 (dockerfile-mode . ("docker-langserver" "--stdio")))
   "How the command `eglot' guesses the server to start.
 An association list of (MAJOR-MODE . CONTACT) pairs.  MAJOR-MODE