bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67246: 30.0.50; elixir-ts-mode uses faces inconsistently


From: Wilhelm Kirschbaum
Subject: bug#67246: 30.0.50; elixir-ts-mode uses faces inconsistently
Date: Mon, 04 Dec 2023 19:46:37 +0200
User-agent: mu4e 1.9.3; emacs 30.0.50


Dmitry Gutov <dmitry@gutov.dev> writes:

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.


Thanks, I have one or two more change related to this issue coming.

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.

Thanks. I am pretty busy atm, so will only get time for this in about a week. There are definitely some issues I spotted as well which needs to
be fixed.

Wilhelm





reply via email to

[Prev in Thread] Current Thread [Next in Thread]