* bug#58769: [PATCH] eglot-server-programs: Account for new modes
@ 2022-10-25 4:01 Brian Leung
2022-10-25 10:25 ` Stefan Kangas
0 siblings, 1 reply; 2+ messages in thread
From: Brian Leung @ 2022-10-25 4:01 UTC (permalink / raw)
To: 58769
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
Tags: patch
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)
Repository revision: 8f16578c45fc1d23aacecdb48111f816088c7b83
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: NixOS 22.11 (Raccoon)
Configured using:
'configure
--prefix=/nix/store/044ilan524hm57j9lhz7fqg2nxfga5n7-emacs-git-20221024.0
--disable-build-details --with-modules --with-x-toolkit=lucid
--with-xft --with-cairo --with-native-compilation'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-eglot-server-programs-Account-for-new-js-json-mode.patch --]
[-- Type: text/patch, Size: 2258 bytes --]
From 2365a02ac3fecafcffea2e35b3852835bf0177c9 Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
Date: Mon, 24 Oct 2022 20:43:50 -0700
Subject: [PATCH 1/2] eglot-server-programs: Account for new js-json-mode
* 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.
js-json-mode derives from js-mode, so the reordering is necessary to
prevent js-mode's eglot server from starting if a user has something
like
(add-to-hook 'js-json-mode #'eglot-ensure)
(add-to-hook 'js-mode #'eglot-ensure)
in their config.
---
lisp/progmodes/eglot.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 71001ba680..9dca05d5f0 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -186,6 +186,7 @@ eglot-server-programs
(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 @@ eglot-server-programs
(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"))
--
2.38.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-eglot-server-programs-Account-for-new-ts-mode.patch --]
[-- Type: text/patch, Size: 1423 bytes --]
From b022569c136dc6a23e1b4cfe5e23e94cb05e233e Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
Date: Mon, 24 Oct 2022 20:46:41 -0700
Subject: [PATCH 2/2] eglot-server-programs: Account for new ts-mode
* lisp/progmodes/eglot.el (eglot-server-programs): Add new major mode
to be used with the typescript-language-server.
At the time of writing, this exists only in the unmerged tree-sitter
branch. It is not harmful to include, however.
---
lisp/progmodes/eglot.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 9dca05d5f0..54756dd21a 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -187,7 +187,7 @@ eglot-server-programs
. ,(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)
+ ((js-mode ts-mode typescript-mode)
. ("typescript-language-server" "--stdio"))
(sh-mode . ("bash-language-server" "start"))
((php-mode phps-mode)
--
2.38.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#58769: [PATCH] eglot-server-programs: Account for new modes
2022-10-25 4:01 bug#58769: [PATCH] eglot-server-programs: Account for new modes Brian Leung
@ 2022-10-25 10:25 ` Stefan Kangas
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Kangas @ 2022-10-25 10:25 UTC (permalink / raw)
To: Brian Leung, 58769; +Cc: João Távora
close 58769 29.1
thanks
Brian Leung <leungbk@posteo.net> writes:
> Tags: patch
Thanks, pushed to master (commit 566e410287 and bb95e597a9).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-25 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-25 4:01 bug#58769: [PATCH] eglot-server-programs: Account for new modes Brian Leung
2022-10-25 10:25 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).