unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs
@ 2022-11-12 22:35 Brian Leung
  2022-11-13  6:29 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Leung @ 2022-11-12 22:35 UTC (permalink / raw)
  To: 59229; +Cc: Stefan Kangas

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Tags: patch

This adds several to-be-merged tree-sitter-based major modes to eglot.



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: be1745606354e8b34325bc9526c9bad9f7302cce
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/09jwzp79mqnhzarmaik6y4lybgkwpg1h-emacs-git-20221111.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-Add-tree-sitter-based-major-modes-to-eglot-server-pr.patch --]
[-- Type: text/patch, Size: 3563 bytes --]

From 263288ae801e432ca941778c8fbf5103c380dbdb Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
Date: Sat, 12 Nov 2022 14:30:37 -0800
Subject: [PATCH] Add tree-sitter-based major modes to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Update.
---
 lisp/progmodes/eglot.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 97c674f7aa..3620f64954 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -187,15 +187,16 @@ 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-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"))
                                 ((php-mode phps-mode)
                                  . ("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"))
@@ -209,7 +210,7 @@ eglot-server-programs
                                 (go-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"))
@@ -227,7 +228,7 @@ eglot-server-programs
                                 (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.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs
  2022-11-12 22:35 bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs Brian Leung
@ 2022-11-13  6:29 ` Eli Zaretskii
  2022-11-13 13:58   ` Stefan Kangas
  2022-11-24 18:44   ` Stefan Kangas
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-11-13  6:29 UTC (permalink / raw)
  To: Brian Leung; +Cc: 59229, stefankangas

> Cc: Stefan Kangas <stefankangas@gmail.com>
> From: Brian Leung <leungbk@posteo.net>
> Date: Sat, 12 Nov 2022 22:35:38 +0000
> 
> This adds several to-be-merged tree-sitter-based major modes to eglot.

Thanks, but please hold your horses on the C/C++/Java modes, as we
didn't yet finalize their integration into Emacs.  It is possible they
will not be major modes after all.

Not sure about JSON and CSS modes, but they might share the same fate.

Bottom line: this is too soon for such change, we should wait at least
until the tree-sitter branch lands on master.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs
  2022-11-13  6:29 ` Eli Zaretskii
@ 2022-11-13 13:58   ` Stefan Kangas
  2022-11-24 18:44   ` Stefan Kangas
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2022-11-13 13:58 UTC (permalink / raw)
  To: Eli Zaretskii, Brian Leung; +Cc: 59229

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: Stefan Kangas <stefankangas@gmail.com>
>> From: Brian Leung <leungbk@posteo.net>
>> Date: Sat, 12 Nov 2022 22:35:38 +0000
>>
>> This adds several to-be-merged tree-sitter-based major modes to eglot.
>
> Thanks, but please hold your horses on the C/C++/Java modes, as we
> didn't yet finalize their integration into Emacs.  It is possible they
> will not be major modes after all.
>
> Not sure about JSON and CSS modes, but they might share the same fate.
>
> Bottom line: this is too soon for such change, we should wait at least
> until the tree-sitter branch lands on master.

Agreed.  We can keep this bug open as a reminder to add them once that
branch is merged though.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs
  2022-11-13  6:29 ` Eli Zaretskii
  2022-11-13 13:58   ` Stefan Kangas
@ 2022-11-24 18:44   ` Stefan Kangas
  2022-11-24 19:41     ` Yuan Fu
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2022-11-24 18:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 59229, Brian Leung

close 59229 29.1
thanks

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: Stefan Kangas <stefankangas@gmail.com>
>> From: Brian Leung <leungbk@posteo.net>
>> Date: Sat, 12 Nov 2022 22:35:38 +0000
>>
>> This adds several to-be-merged tree-sitter-based major modes to eglot.
>
> Thanks, but please hold your horses on the C/C++/Java modes, as we
> didn't yet finalize their integration into Emacs.  It is possible they
> will not be major modes after all.
>
> Not sure about JSON and CSS modes, but they might share the same fate.
>
> Bottom line: this is too soon for such change, we should wait at least
> until the tree-sitter branch lands on master.

AFAICT, these modes have all landed on master, so I've pushed the patch
and I'm closing the bug.  Thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs
  2022-11-24 18:44   ` Stefan Kangas
@ 2022-11-24 19:41     ` Yuan Fu
  0 siblings, 0 replies; 5+ messages in thread
From: Yuan Fu @ 2022-11-24 19:41 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 59229, Brian Leung, Eli Zaretskii



> On Nov 24, 2022, at 10:44 AM, Stefan Kangas <stefankangas@gmail.com> wrote:
> 
> close 59229 29.1
> thanks
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
>>> Cc: Stefan Kangas <stefankangas@gmail.com>
>>> From: Brian Leung <leungbk@posteo.net>
>>> Date: Sat, 12 Nov 2022 22:35:38 +0000
>>> 
>>> This adds several to-be-merged tree-sitter-based major modes to eglot.
>> 
>> Thanks, but please hold your horses on the C/C++/Java modes, as we
>> didn't yet finalize their integration into Emacs.  It is possible they
>> will not be major modes after all.
>> 
>> Not sure about JSON and CSS modes, but they might share the same fate.
>> 
>> Bottom line: this is too soon for such change, we should wait at least
>> until the tree-sitter branch lands on master.
> 
> AFAICT, these modes have all landed on master, so I've pushed the patch
> and I'm closing the bug.  Thanks.
> 

Thank you!

Yuan





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-24 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-12 22:35 bug#59229: [PATCH] Add tree-sitter-based major modes to eglot-server-programs Brian Leung
2022-11-13  6:29 ` Eli Zaretskii
2022-11-13 13:58   ` Stefan Kangas
2022-11-24 18:44   ` Stefan Kangas
2022-11-24 19:41     ` Yuan Fu

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).