From: Brian Leung Date: Tue, 25 Oct 2022 03:43:50 +0000 (-0700) Subject: eglot-server-programs: Account for new js-json-mode X-Git-Tag: emacs-29.0.90~1616^2~477 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=566e410287d9898f90c81131bfa8c85462fab55e;p=emacs.git eglot-server-programs: Account for new js-json-mode js-json-mode derives from js-mode, so this reordering is necessary to prevent js-mode's eglot server from starting if a user has something like this in their config: (add-to-hook 'js-json-mode #'eglot-ensure) (add-to-hook 'js-mode #'eglot-ensure) * lisp/progmodes/eglot.el (eglot-server-programs): Move the json-language-server info before the entry for js-mode, and add on js-json-mode. (Bug#58769) --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 827a5e98483..9264a5b0f08 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -186,6 +186,7 @@ chosen (interactively or automatically)." (python-mode . ,(eglot-alternatives '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server"))) + ((js-json-mode json-mode) . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") ("json-languageserver" "--stdio")))) ((js-mode typescript-mode) . ("typescript-language-server" "--stdio")) (sh-mode . ("bash-language-server" "start")) @@ -227,7 +228,6 @@ language-server/bin/php-language-server.php")) (zig-mode . ("zls")) (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")) ((clojure-mode clojurescript-mode clojurec-mode) . ("clojure-lsp"))