unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62327: [PATCH] Minor additions for heex- and elixir-ts-mode
@ 2023-03-21 10:52 Wilhelm Kirschbaum
  2023-03-23  8:50 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Wilhelm Kirschbaum @ 2023-03-21 10:52 UTC (permalink / raw)
  To: 62327

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


The first patch set heex-ts-mode to use the same language server 
as
elixir-ts-mode. The second adds a test to make it easier for 
detecting
breaking change to HEEx embeds.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add heex-ts-mode to eglot-server-programs --]
[-- Type: text/x-patch, Size: 1286 bytes --]

From 12ab3a29000f55e4b77e10602f47702c907a43ea Mon Sep 17 00:00:00 2001
From: Wilhelm H Kirschbaum <wkirschbaum@gmail.com>
Date: Tue, 21 Mar 2023 11:48:30 +0200
Subject: [PATCH 1/2] Add heex-ts-mode to eglot-server-programs

The same language server is used for elixir and heex modes.

* lisp/progmodes/eglot.el (eglot-server-programs): Add heex-ts-mode.
---
 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 fe9bc510049..cae5e038f11 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -221,7 +221,7 @@ eglot-server-programs
                                 ((java-mode java-ts-mode) . ("jdtls"))
                                 (dart-mode . ("dart" "language-server"
                                               "--client-id" "emacs.eglot-dart"))
-                                ((elixir-ts-mode elixir-mode) . ("language_server.sh"))
+                                ((elixir-mode elixir-ts-mode heex-ts-mode) . ("language_server.sh"))
                                 (ada-mode . ("ada_language_server"))
                                 (scala-mode . ,(eglot-alternatives
                                                 '("metals" "metals-emacs")))
-- 
2.40.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: Add test to elixir-ts-mode-tests.el --]
[-- Type: text/x-patch, Size: 1132 bytes --]

From b42d8a10124a83d39248bef31ffbb12efd04db0b Mon Sep 17 00:00:00 2001
From: Wilhelm H Kirschbaum <wkirschbaum@gmail.com>
Date: Tue, 21 Mar 2023 12:13:58 +0200
Subject: [PATCH 2/2] ; Add test for embedded HEEx to elixir-ts-mode-tests

* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test.
---
 .../elixir-ts-mode-resources/indent.erts      | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts b/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts
index 748455cc3f2..ea5d9e62240 100644
--- a/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts
@@ -306,3 +306,27 @@ Name: Long tuple
 {"January", "February", "March", "April", "May", "June", "July", "August", "September",
  "October", "November", "December"}
 =-=-=
+
+Name: Embedded HEEx
+
+=-=
+ defmodule Foo do
+ def foo(assigns) do
+~H"""
+<span>
+text
+</span>
+"""
+ end
+ end
+=-=
+defmodule Foo do
+  def foo(assigns) do
+    ~H"""
+    <span>
+      text
+    </span>
+    """
+  end
+end
+=-=-=
-- 
2.40.0


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

* bug#62327: [PATCH] Minor additions for heex- and elixir-ts-mode
  2023-03-21 10:52 bug#62327: [PATCH] Minor additions for heex- and elixir-ts-mode Wilhelm Kirschbaum
@ 2023-03-23  8:50 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-03-23  8:50 UTC (permalink / raw)
  To: Wilhelm Kirschbaum; +Cc: 62327-done

> From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
> Date: Tue, 21 Mar 2023 12:52:39 +0200
> 
> The first patch set heex-ts-mode to use the same language server as
> elixir-ts-mode. The second adds a test to make it easier for
> detecting breaking change to HEEx embeds.

Thanks, installed on the master branch.





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

end of thread, other threads:[~2023-03-23  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 10:52 bug#62327: [PATCH] Minor additions for heex- and elixir-ts-mode Wilhelm Kirschbaum
2023-03-23  8:50 ` Eli Zaretskii

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