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


Message #56 received at 67246 <at> debbugs.gnu.org (full text, mbox):

From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: 67246 <at> debbugs.gnu.org, Dmitry Gutov <dmitry <at> gutov.dev>
Subject: Re: bug#67246: 30.0.50; elixir-ts-mode uses faces inconsistently
Date: Mon, 04 Dec 2023 19:50:06 +0200
Andrey Listopadov <andreyorst <at> gmail.com> writes:

> Dmitry Gutov <dmitry <at> 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! The code now seems to be properly highlighted. I've just 
> tested
> the update and noticed that putting the `do' keyword on a 
> separate line
> breaks indentation. Here's an example:
>
> defmodule Foo
>   do # case A
>   @moduledoc """
>   Test module.
>   """
>
>   defp a(x), do: a(x, 0)
>
>   defp a(x, y),
>        do: a(x, 0, 0) # case B
>
>   defp a(x, y, z)
> do # case C
>   x + y + z
> end
>   end
>
> I have intentionally introduced incorrect indentation before the 
> first
> `do' keyword (case A), but the matching `end' keyword was 
> indented
> automatically when I called `indent-region' on the whole buffer. 
> The
> case B seems to be indented incorrectly, the default formatter 
> would
> indent such `do:' by just two spaces after the parent `defp'.
>
> The third case C is similar to case A, except the indentation 
> was
> provided by Emacs, meaning, after pressing the RET key before 
> the `do'
> keyword, Emacs had put the keyword at the BOL. If there are no 
> `do'
> after the closing parenthesis, the automatic indentation is 
> correct.
>
> I'm not sure if these problems were introduced by the changes, 
> or were
> present before, and if I should send a separeate bug report for 
> them, as
> this isn't strictly related to highlighting, just with the
> tree-sitter-based indentation.

The indention should be another issue imo. The changes in this 
thread
would not impact indentation.

Indentation is probably slightly more complicated than 
fontification, but
planning to take some time in a couple of weeks to fix some 
issues.

Wilhelm




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

Previous Next


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