From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#67246: 30.0.50; elixir-ts-mode uses faces inconsistently Date: Mon, 04 Dec 2023 19:50:06 +0200 Message-ID: <874jgxvoma.fsf@gmail.com> References: <87y1ewgnn7.fsf@gmail.com> <9ae8eb33-fd8b-f8d6-dd7f-79f8d4464a51@gutov.dev> <87a5r2p4pq.fsf@gmail.com> <87bkbfkr1h.fsf@gmail.com> <22ea1559-f44e-933d-e60a-9caa62b376a8@gutov.dev> <871qc3imfq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24365"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: 67246@debbugs.gnu.org, Dmitry Gutov To: Andrey Listopadov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 04 18:57:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rADCC-00060H-Ib for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Dec 2023 18:57:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rADBt-0001k1-Kx; Mon, 04 Dec 2023 12:57:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rADBc-0001j1-L0 for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 12:56:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rADBb-0000Ep-JN for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 12:56:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rADBm-0005km-2i for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 12:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Dec 2023 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67246 X-GNU-PR-Package: emacs Original-Received: via spool by 67246-submit@debbugs.gnu.org id=B67246.170171256422049 (code B ref 67246); Mon, 04 Dec 2023 17:57:02 +0000 Original-Received: (at 67246) by debbugs.gnu.org; 4 Dec 2023 17:56:04 +0000 Original-Received: from localhost ([127.0.0.1]:35636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rADAp-0005jZ-Hq for submit@debbugs.gnu.org; Mon, 04 Dec 2023 12:56:03 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:49466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rADAn-0005j5-OK for 67246@debbugs.gnu.org; Mon, 04 Dec 2023 12:56:02 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c07ed92fdso18940775e9.3 for <67246@debbugs.gnu.org>; Mon, 04 Dec 2023 09:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701712545; x=1702317345; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=E66K13Obp64EMNvjLp5/IzDU8dn87TrzGRXTKYsoIPY=; b=F1Wf4n3S+eDD7rzKXzItDMJJ4mLUfrAUZrE1oaHW7yp2kqVrNLokAaviNCJ5QxesRs PKVj1kfvlPPYk6lXjH6hMv25CR3brm3hAZkdJQ+TdihkbtmWnS/3/ZS95e7tFhJ7OfAD exisOWUYOcHQp/97WBS65fiAUl0mZSZYxFa/hgK+Ga9dFYRvChYJFvj+LlPLGXIsGQei /s8wgr3coy6dxTB3fQboHAwRqHCLjfU9R7rNhCPoh5OsQNT80jh4hAEfrzN+GDxae3wn MtAhv200cJu3VolMIpzY1eHO5BFDxsjwh6AI7wKs7Mio0+9MopEELVflokJrTiFAn4j1 WOsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701712545; x=1702317345; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=E66K13Obp64EMNvjLp5/IzDU8dn87TrzGRXTKYsoIPY=; b=Ge50V1wMTTOi9oXkwmm0Mx801wpeoqA3fVikB6qGojVua11vL5iQ3s4uk6kaslEWIJ 7eWCSE7SL781liTOfPPc/jDL1Xj3o5G4Tpgny/LtIl/DelBWtNUPvcVa9J7pWq0bPGop LkWwmlNyiq/S3D6tHeFSQk2QDM8BzCS/MF140y/iMIF1n+Meb38AuhJmb5SBv61IZ7DZ lbpvxaZ2hqC8cFm5C97Hxy+DrxeynPAMiMqi1BR7fOr7us07ZZZgy38O966HDr9T2SxC IY8LGIIARJP2A6wEn8h+YEVdbyBaw9BdXL2YJk+UhzGt3XuW0Eu7tnqYxD7U0M81bPe1 Yi3g== X-Gm-Message-State: AOJu0YznGE2tfwuz9ZGerzlumImtkBBgXBGjOUpnVO5nBifcmNyoMCC+ GdpOEbtPfRsf0nKG9+vFJ+E5IOBgFog= X-Google-Smtp-Source: AGHT+IFIacKHs5NQZiw8pIBW8gbwoVLUPaj78OOwTc2ZuwWqEpZ1oSya051HaL4dmOClEdDnco3q5Q== X-Received: by 2002:a05:600c:1994:b0:406:c6de:2bea with SMTP id t20-20020a05600c199400b00406c6de2beamr2435593wmq.17.1701712544766; Mon, 04 Dec 2023 09:55:44 -0800 (PST) Original-Received: from melissa.local (ec2-13-245-110-27.af-south-1.compute.amazonaws.com. [13.245.110.27]) by smtp.gmail.com with ESMTPSA id c8-20020adfe708000000b003332aa97101sm11261787wrm.38.2023.12.04.09.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 09:55:44 -0800 (PST) In-reply-to: <871qc3imfq.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275522 Archived-At: Andrey Listopadov writes: > Dmitry Gutov writes: > >> On 27/11/2023 19:59, Wilhelm Kirschbaum wrote: >>> Here is a patch to address numerous issues flagged on Elixir=20 >>> slack, >>> Github and in this thread.=C2=A0 It will not be perfect, but since=20 >>> the >>> changes are pretty large I want to get this in and then we can=20 >>> 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=20 > tested > the update and noticed that putting the `do' keyword on a=20 > 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=20 > first > `do' keyword (case A), but the matching `end' keyword was=20 > indented > automatically when I called `indent-region' on the whole buffer.=20 > The > case B seems to be indented incorrectly, the default formatter=20 > would > indent such `do:' by just two spaces after the parent `defp'. > > The third case C is similar to case A, except the indentation=20 > was > provided by Emacs, meaning, after pressing the RET key before=20 > the `do' > keyword, Emacs had put the keyword at the BOL. If there are no=20 > `do' > after the closing parenthesis, the automatic indentation is=20 > correct. > > I'm not sure if these problems were introduced by the changes,=20 > or were > present before, and if I should send a separeate bug report for=20 > 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=20 thread would not impact indentation. Indentation is probably slightly more complicated than=20 fontification, but planning to take some time in a couple of weeks to fix some=20 issues. Wilhelm