GNU bug report logs -
#67246
30.0.50; elixir-ts-mode uses faces inconsistently
Previous Next
Full log
View this message in rfc822 format
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.