From 49e46c3d5333b0aa10f0eeefba03f95b8a4a9862 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 8 Jan 2022 17:43:23 -0800 Subject: [PATCH] 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. --- lisp/progmodes/eglot.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.2