From: Brian Leung Date: Sun, 9 Jan 2022 01:43:23 +0000 (-0800) Subject: Add up-to-date server executables for html/css/json X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~101 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49e46c3d5333b0aa10f0eeefba03f95b8a4a9862;p=emacs.git Add up-to-date server executables for html/css/json * 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. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 2a8000cce3f..ef9b371af89 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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