elixir-ts-mode icon indicating copy to clipboard operation
elixir-ts-mode copied to clipboard

HEEx escaped double quote error

Open angrycandy opened this issue 1 year ago • 3 comments

  • Using:

    • elixir-ts-mode 20231128.645
    • https://github.com/elixir-lang/tree-sitter-elixir v0.1.1
    • https://github.com/phoenixframework/tree-sitter-heex v0.6.0
  • This highlights correctly:

defmodule AppWeb.Live.Components.FooBar do
  def render(assigns) do
    ~H"""
      <div>
        <%= gettext("At %{foo_bar}", %{foo_bar: @foo.bar}) %>
      </div>
    """
  end
end
  • This fails to highlight:
defmodule AppWeb.Live.Components.FooBar do
  def render(assigns) do
    ~H"""
      <div>
        <%= gettext("At \"%{foo_bar}\"", %{foo_bar: @foo.bar}) %>
      </div>
    """
  end
end
  • with *Messages* error:
redisplay--pre-redisplay-functions: (treesit-range-invalid "RANGE is either overlapping, out-of-order or out-of-range" ((74 . 75) (78 . 115) (74 . 75) (117 . 127) (74 . 75) (129 . 174)))

angrycandy avatar Feb 19 '24 22:02 angrycandy

@angrycandy emacs version so that I can test?

wkirschbaum avatar Feb 28 '24 17:02 wkirschbaum

@angrycandy emacs version so that I can test?

From https://emacsformacosx.com

GNU Emacs 29.2 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-01-18

angrycandy avatar Feb 28 '24 17:02 angrycandy

I suspect that might be a issue with treesit.el, but will have to look.

wkirschbaum avatar Feb 28 '24 17:02 wkirschbaum

@angrycandy if you run the latest emacs 29 and latest tree-sitter do you still get this issue? I can"t reproduct this, but know there were several fixes.

wkirschbaum avatar Dec 28 '24 09:12 wkirschbaum

@wkirschbaum I still see this bug after upgrading today.

  • upgrade to the latest on Arch Linux AMD
Package (2)        Old Version  New Version  Net Change

extra/tree-sitter  0.22.6-1     0.24.3-2       0.01 MiB
extra/emacs-nox    29.4-1       29.4-3         0.02 MiB
  • upgrade to the latest emacs package
  elixir-ts-mode                 20241228.919   installed             Major mode for Elixir with tree-sitter support.
  heex-ts-mode                   20231007.725   dependency            Major mode for Heex with tree-sitter support
  • recompile ~/.emacs.d/tree-sitter
  -rwxr-xr-x  1 bfw users 1.4M Jan  1 10:30 libtree-sitter-elixir.so
  -rwxr-xr-x  1 bfw users 289K Jan  1 10:30 libtree-sitter-erlang.so
  -rwxr-xr-x  1 bfw users  36K Jan  1 10:30 libtree-sitter-heex.so
  • *Messages*
Cleaning up the recentf list...done (0 removed)
Truncate long lines enabled [2 times]
redisplay--pre-redisplay-functions: (treesit-range-invalid "RANGE is either overlapping, out-of-order or out-of-range" ((74 . 75) (78 . 115) (74 . 75) (117 . 127) (74 . 75) (129 . 174)))
Error during redisplay: (jit-lock-function 1) signaled (treesit-range-invalid "RANGE is either overlapping, out-of-order or out-of-range" ((74 . 75) (78 . 115) (74 . 75) (117 . 127) (74 . 75) (129 . 174)))

angrycandy avatar Jan 01 '25 15:01 angrycandy