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:46:37 +0200 Message-ID: <878r69vow6.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> 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="27673"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: Andrey Listopadov , 67246@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 04 18:51:09 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 1rAD64-0006zF-Vo for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Dec 2023 18:51:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAD5y-0000XR-E4; Mon, 04 Dec 2023 12:51:02 -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 1rAD5o-0000Vz-40 for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 12:50:55 -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 1rAD5n-0007RM-8i for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 12:50:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rAD5x-0005bW-Sy for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 12:51:01 -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:51:01 +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.170171220921474 (code B ref 67246); Mon, 04 Dec 2023 17:51:01 +0000 Original-Received: (at 67246) by debbugs.gnu.org; 4 Dec 2023 17:50:09 +0000 Original-Received: from localhost ([127.0.0.1]:35632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAD56-0005aH-MN for submit@debbugs.gnu.org; Mon, 04 Dec 2023 12:50:09 -0500 Original-Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:52260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAD54-0005Zl-Nr for 67246@debbugs.gnu.org; Mon, 04 Dec 2023 12:50:07 -0500 Original-Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40c09dfd82aso19360475e9.0 for <67246@debbugs.gnu.org>; Mon, 04 Dec 2023 09:49:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701712189; x=1702316989; 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=kNoFiV6YCgxeHB4IYzNd+jekRc4g2dnEUAWeHxGViHI=; b=gVMGsKAPMVm+qOHWWXK2JKqxm7Pw59YT06m0q7qAeIPybcg3qnXfDIxAo2p36soCbT bux0tmGW8Mp58ooRgwH4NrQI2lZ1qtuMVQ/5HYkE11P4hulVqkzxvmwIenF9S0gx1M3p KQk3thj1mwWX1DawILdOdWIaNPCky71jIRoj39K33WS9MmKqA3Ck8CE1hQkc13AYUTd3 UxF9xKXwMxRJa4FbO9uM+pVB9Jcvxk5gzEnRZCPePttKYxiBpwBBx53x3WSZvL+4sh5k nKl1F54/wcj1b2yEwKJNOExxrViLvQbwp7SkYKsZTjIkZa25AQPc4CC1UJzqK2g6GcRZ 6h5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701712189; x=1702316989; 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=kNoFiV6YCgxeHB4IYzNd+jekRc4g2dnEUAWeHxGViHI=; b=oQcdELDPaprYOQumaqPhw8Xf2OV6dyMbKo7zyD+y0SZYg/tYPytm7ouvljp7Fdo4uo IfQrcXAdFPdVc93ntTkCMryhu1KaUdwuhZ72SJRfrAkMtAt9bvRtCIjKbdsiFXdaYxVK 5h+8kAEVQi2E2YR5SVe3Zg1H8KzAtLzXA0oIBwdwTzRxOsvsVaoJQBE8Tbg2Y8MTxnoL 5S7gqbi/zzngwgNfC2La0kZH3yXT99tlxy/G7z2goXWP9bLjVqLqsDfHgJhZh0RaNzq0 +C/2vrUQKkYOADQaqxx4AgmkQybRIyFdZj8RvGNrA80EhlSPugMMSqz9MZm4i+YNEAUD o1Iw== X-Gm-Message-State: AOJu0YwtL5JoxvxJkvy6Z5qmSvAGCDOsDXq4LKY7xyrZ3n0uWXdlPK6x Fcln5IMxVpwmfeubJXTK5X7e72uiJz8= X-Google-Smtp-Source: AGHT+IFR5CnDGderbSpMZta16wYpYVK8Khy7J7O7uAgl/CbeLZK1B64RC1YJiJeQI91zD148TlLbWg== X-Received: by 2002:a1c:7214:0:b0:40b:5e1d:83a9 with SMTP id n20-20020a1c7214000000b0040b5e1d83a9mr1235801wmc.61.1701712189314; Mon, 04 Dec 2023 09:49:49 -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 a13-20020a05600c348d00b0040b5377cf03sm19616872wmq.1.2023.12.04.09.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 09:49:48 -0800 (PST) In-reply-to: <22ea1559-f44e-933d-e60a-9caa62b376a8@gutov.dev> 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:275521 Archived-At: 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, I have one or two more change related to this issue=20 coming. >> I am making the assumption that it is okay to rename custom=20 >> 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=20 >> works >> relatively well, which means a bit more brute forcing queries.=C2=A0=20 >> I have >> not seen a major performance issue on massic Elixir files, so=20 >> 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=20 > because the > grammar parses these as nodes of type "call", just like it does=20 > 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" =3D> %{"line" =3D> line, "character" =3D> start_idx}, > "end" =3D> %{"line" =3D> line, "character" =3D> start_idx +=20 > length} > } > > are highlighted with -name-, even though there's no=20 > destructuring here. > > Anyway, good job, I can see that Elixir's grammar is one of the=20 > harder > ones to work with. Thanks. I am pretty busy atm, so will only get time for this in=20 about a week. There are definitely some issues I spotted as well which=20 needs to be fixed. Wilhelm