From 94ec173a732641f00535997e8381b9ef2c2814cd Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 12 Nov 2022 14:30:37 -0800 Subject: [PATCH] Add tree-sitter-based modes to eglot-server-programs * lisp/progmodes/eglot.el (eglot-server-programs): Add tree-sitter-based major modes. (Bug#59229) --- lisp/progmodes/eglot.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 5f13679b1ea..bc431369235 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -187,7 +187,9 @@ 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-json-mode json-mode json-ts-mode) + . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") + ("json-languageserver" "--stdio")))) ((js-mode ts-mode typescript-mode) . ("typescript-language-server" "--stdio")) (sh-mode . ("bash-language-server" "start")) @@ -195,8 +197,9 @@ chosen (interactively or automatically)." . ,(eglot-alternatives '(("phpactor" "language-server") ("php" "vendor/felixfbecker/language-server/bin/php-language-server.php")))) - ((c++-mode c-mode) . ,(eglot-alternatives - '("clangd" "ccls"))) + ((c-mode c-ts-mode c++-mode c++-ts-mode) + . ,(eglot-alternatives + '("clangd" "ccls"))) (((caml-mode :language-id "ocaml") (tuareg-mode :language-id "ocaml") reason-mode) . ("ocamllsp")) @@ -210,7 +213,7 @@ chosen (interactively or automatically)." ((go-mode go-dot-mod-mode go-dot-work-mode) . ("gopls")) ((R-mode ess-r-mode) . ("R" "--slave" "-e" "languageserver::run()")) - (java-mode . ("jdtls")) + ((java-mode java-ts-mode) . ("jdtls")) (dart-mode . ("dart" "language-server" "--client-id" "emacs.eglot-dart")) (elixir-mode . ("language_server.sh")) @@ -228,7 +231,9 @@ chosen (interactively or automatically)." (lua-mode . ,(eglot-alternatives '("lua-language-server" "lua-lsp"))) (zig-mode . ("zls")) - (css-mode . ,(eglot-alternatives '(("vscode-css-language-server" "--stdio") ("css-languageserver" "--stdio")))) + ((css-mode css-ts-mode) + . ,(eglot-alternatives '(("vscode-css-language-server" "--stdio") + ("css-languageserver" "--stdio")))) (html-mode . ,(eglot-alternatives '(("vscode-html-language-server" "--stdio") ("html-languageserver" "--stdio")))) (dockerfile-mode . ("docker-langserver" "--stdio")) ((clojure-mode clojurescript-mode clojurec-mode) -- 2.39.2