GNU bug report logs - #67246
30.0.50; elixir-ts-mode uses faces inconsistently

Previous Next

Package: emacs;

Reported by: Andrey Listopadov <andreyorst <at> gmail.com>

Date: Fri, 17 Nov 2023 19:57:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
Cc: Andrey Listopadov <andreyorst <at> gmail.com>, 67246 <at> debbugs.gnu.org
Subject: bug#67246: 30.0.50; elixir-ts-mode uses faces inconsistently
Date: Wed, 29 Nov 2023 05:24:53 +0200
On 27/11/2023 19:59, Wilhelm Kirschbaum wrote:
> Here is a patch to address numerous issues flagged on Elixir slack,
> Github and in this thread.  It will not be perfect, but since the
> changes are pretty large I want to get this in and then we can pick on
> specific issues afterwards if that makes sense?

Thank you. No problem, pushed to master.

> I am making the assumption that it is okay to rename custom faces as
> elixir-ts-mode is only for 30.

I think so.

> One thing I tried to get right is to ensure that each level works
> relatively well, which means a bit more brute forcing queries.  I have
> not seen a major performance issue on massic Elixir files, so think its
> fine.

One thing that jumped out at me is that arguments in method definitions 
(e.g. 'def build(parent, root_path, opts) do') are highlighted with the 
-use- face. Apparently, that's simply because the grammar parses these 
as nodes of type "call", just like it does for regular function calls. 
So that's unusual.

I suppose it's possible to separate them by matching on the call 
target's text? Which would be "def" or "defp".

Conversely, variable refs in expressions such as

  %{
    "start" => %{"line" => line, "character" => start_idx},
    "end" => %{"line" => line, "character" => start_idx + length}
  }

are highlighted with -name-, even though there's no destructuring here.

Anyway, good job, I can see that Elixir's grammar is one of the harder 
ones to work with.




This bug report was last modified 1 year and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.