GNU bug report logs - #74461
[PATCH] Add go-work-ts-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Gabriel Santos <gabrielsantosdesouza@HIDDEN>; Keywords: patch confirmed; dated Thu, 21 Nov 2024 13:59:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 4 Jan 2025 19:13:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 14:13:52 2025
Received: from localhost ([127.0.0.1]:57411 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU9ap-0008At-OF
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 14:13:51 -0500
Received: from mail-4323.proton.ch ([185.70.43.23]:18639)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dev@HIDDEN>) id 1tU9am-0008AW-NX
 for 74461 <at> debbugs.gnu.org; Sat, 04 Jan 2025 14:13:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev;
 s=protonmail3; t=1736018022; x=1736277222;
 bh=U77j8nhBXdv2+6E1DndHy0ZypRD1A9P03rm8ku1l+fU=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=WStX6K3nngdZz3GFB3Irnj4ZfqTApw00uQTUlje5cn/MaD/TxdVBb9DgSjcGyx4tI
 797ubiskX0LPE3idELU+Qw4n9H0hnaPoUb2Q+9SKz7vmoxGji2RqS9jzxUnef31Vra
 AdRs9lfXWQ/Alq7dQO9F3loEZs+NeHRYBSVRVBRdnLTBV4cWtgi4Jwe1BzN4w0L7Gy
 5mcVtd1Bm4k2trn+4tWqa75iQXqgrwvQTFGRxqJAj/fWsaBqO1WUEs3qul3yjdZl8S
 9FZ93MpzVUiQA2BGpppTRQmMjbu4+ljW7mgm6l0LWyrPTNjKD2C2COj53mMQjrtf2A
 7hoTFf9V8i8Hg==
Date: Sat, 04 Jan 2025 19:13:37 +0000
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
From: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Message-ID: <LnE-eehZeHohunopiTZkhHSU1WuKpJlcOvCfq5Ktyyh4TeZgGPmztIopHupfUVEYCjG_hmh__uOXrCcQXI5byMwf5rULqTnq9hFKLtqF7zM=@rjt.dev>
In-Reply-To: <8734i2c5qx.fsf@HIDDEN>
References: <8734i2c5qx.fsf@HIDDEN>
Feedback-ID: 44397038:user:proton
X-Pm-Message-ID: d2a217fd9ccd0ad29bbc08ebb87386c747bd7e5c
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wednesday, January 1st, 2025 at 21:24, Gabriel Santos <gabrielsantosdeso=
uza@HIDDEN> wrote:
>=20
>=20
> Updated the patch to follow the suggestions made by Randy:
>=20
> - Rename go-mod-ts-mode--in-directive-p
> - Add latest grammar versions of go-mod and go-work
> - Removed the mention of the now defunct go-work-ts-mode--syntax-table
> - Added back the syntax table for the regular Go tree-sitter mode
>=20
> --
> Gabriel Santos

Thanks, looks good to me.

Eli, please install if you have no further comments. Thanks in
advance.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Removed tag(s) pending. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 06:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 02 01:14:30 2025
Received: from localhost ([127.0.0.1]:42414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTETW-0006Hr-22
	for submit <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:14:30 -0500
Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:49635)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tTETU-0006HR-PC
 for 74461 <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:14:29 -0500
Received: by mail-ej1-x62e.google.com with SMTP id
 a640c23a62f3a-aa6a618981eso1817884966b.3
 for <74461 <at> debbugs.gnu.org>; Wed, 01 Jan 2025 22:14:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1735798462; x=1736403262; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=LH4BA1Sm7bBzNUbI9dbjDQ9nMgPty9GZ8CKFZJMztt4=;
 b=lmyUkIKjPxyPjuJJYx4uBIiUxvLrTINH/6uV3f9h8A4Cwp5ct8eogIafa7t3gmJOiK
 M/a1cwbl2OG4aXFbBZlT7tU4qDlNqgvSpKOIgkcfYj0vRJytdG3Bsbh8h/iqJgGK8QyM
 QBrxur0GgWq7DHkCjGeBgVkZzBXfvkq8dyR2SmiO/aJqqIWv/yf1cIQk9g+yBKCiqW4B
 yHGYfmcr4PLDd8mgDWMwCzQKv5WV9BiQbmPd4nIwQoMkyLEWMxArLwVK6fiF6BoL0GUZ
 LpS+syfTJGkcnfS5WBxZ7Ui1RLvxrD8KRGxWqDrLF7UbafLD8UVllflqp93N9/wIbTA+
 dk9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1735798462; x=1736403262;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=LH4BA1Sm7bBzNUbI9dbjDQ9nMgPty9GZ8CKFZJMztt4=;
 b=GvLyEYpjKc/QlatDeUqsm5faA0MUcfifxNFgg09V+60I2LpxErkaZClXV7fzWrWHKX
 zKmLwNkGMM26Jal8uZti/jeORrm7FBJ/oDl9nSFhid8GCwjilJ9b/jIR+gw1sEcdE9Qy
 ZminDmprGlpKj0Tbj1VXueDZ9m2hv3lVCzzQ4Ld+VPocYQOkXTqYxTPiaRmFbTcyVGDF
 2Z2m4cTR55zPQONnPGcu07UFrkfeHS7OBO/8Rvq9bpoRlzwygjP0g5bfuTA8N2W0jOcy
 MTatI8w+KPFWYNm2/twDUkU7mmYg/3HSmzmK9iD1T0VqO3l4pHfcW90uC9XLsyEyNhyZ
 R7uw==
X-Forwarded-Encrypted: i=1;
 AJvYcCW1GAXo1hAN8dpQLBvL7cyJ+4O6xoep31VttgI4TfwFVtfMad+LxNsR4zaTsKXirOf6zQeGiQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyhseDak4yL0YTOPwBSuGzE8uO5Gz5gLh59gEcVfNTa3dT2aMwg
 C/G9eKhRQIr0MlARLfHE1rZwfW9fMZ1UpCO9KSqQ8I7838BwppZH+ieF1OiDT09/CX/Ulem1u6J
 1QOqKgw30SBDm+1pw5TabSYL8AyU=
X-Gm-Gg: ASbGnct1vkkc/P2lmPumiEeHeyNLpGW8XfQDjvDhUXUR+GsJw6TrlsYKRLHH8UpIhI2
 G8e8/sUvcvkg87Kk3iS45KRDgFLUPF6MlrxaQq+pc
X-Google-Smtp-Source: AGHT+IFWJa3uwN83j+i63xCDj3/vkMj6mUROpbI7hNq09qaogKZFMSpEDgQW3JDDvRGeIasahNjcL6/oU32ThespWAc=
X-Received: by 2002:a17:906:dc92:b0:aab:da48:493e with SMTP id
 a640c23a62f3a-aac2ad88fdbmr4495631666b.21.1735798462422; Wed, 01 Jan 2025
 22:14:22 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Thu, 2 Jan 2025 00:14:22 -0600
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <CADwFkmmP1aMZdwH2pcBGS1cXkSZK81-zMMbbPgsBNwCky8KuSg@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN>
 <-9CYv1jXFzOpWe6WlJ_GVtAFtexLt4j0Jt62SEVC1ZGfDVmnzJSSGXQRqm2n47k9r1rLrCdBdaXxf9QEjXrQUSDFhT1iXyHqgYHmAy9t0Uc=@rjt.dev>
 <877c8jf1qd.fsf@HIDDEN>
 <CADwFkmmP1aMZdwH2pcBGS1cXkSZK81-zMMbbPgsBNwCky8KuSg@HIDDEN>
MIME-Version: 1.0
Date: Thu, 2 Jan 2025 00:14:22 -0600
Message-ID: <CADwFkmmvar2K=1XiKnAzOKNyGq69GBAY6agvA4PiaSCfCB4Ymw@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>,
 Randy Taylor <dev@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tag 74461 - pending
tag 74461 + confirmed
thanks

Stefan Kangas <stefankangas@HIDDEN> writes:

> tag 74461 + pending
> thanks
>
> Gabriel Santos via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@HIDDEN> writes:
>
>>> Thanks for working on this! The patch looks good to me.
>>
>> And it will be able to be merged soon! I just got my FSF paper today,
>> will be signing it tomorrow.
>
> Great, thanks.  I'm tagging this as pending for now.

Oops, I see now that the copyright assignment is completed.

Sorry for the noise.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.
Added tag(s) pending. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 06:12:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 02 01:12:48 2025
Received: from localhost ([127.0.0.1]:42404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTERs-0006E9-1c
	for submit <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:12:48 -0500
Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:47536)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tTERq-0006Do-04
 for 74461 <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:12:46 -0500
Received: by mail-ed1-x52d.google.com with SMTP id
 4fb4d7f45d1cf-5d3d143376dso15962595a12.3
 for <74461 <at> debbugs.gnu.org>; Wed, 01 Jan 2025 22:12:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1735798359; x=1736403159; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=kjCGgWTlfhDf2rMyca9RGAuOrj9ROe5NXUflCilrplk=;
 b=Y1VLJlSvVQp41znd/149cca2BpZkHDEFg5k4Ed6l90JgZKkcXVdfIebNJrLc8aBVbz
 gF2sWcfOCiI2AOUyeEcXl2JeCg0/7fqrlWqJtkKJxs0wQzrI1v5oJ9iCHoZlnw0rnZHz
 p/kp1DENdY6ORGPlfxc4uliZd3MxxGln5InhzGBdwO53/8BZKcUueDJK76yug8t3aeRR
 fcTAjXDXnCQLMmYhUylJC8v+gnln/NAFMu1Ki4iscZeHv1ipAa8JhkAnulF+BIJsESTb
 SaiL3l+UiDpbLk5Z+ohX6Ge7mk5wZJlUhvSmMFF6dcbQwkUPmZMsnVVotNKgXmoSDdrw
 gGAQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1735798359; x=1736403159;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=kjCGgWTlfhDf2rMyca9RGAuOrj9ROe5NXUflCilrplk=;
 b=UnZC4iizuplGJSR1NRm6SqDiJP6ADkZz8AB3Tz/1sc+cO04RupXHXGFy2lWgtdmEVg
 rUcHpfG38662nHuGKtvgkKLbEs4BdIMkdamvX2aEEggz+Qs8FB/PY/jopZ0XbGdfb+RR
 hDXiW0gaiE6r49yE3a+HMa3AzkWzfAYfTX2vS/AYLsUXTJRC10MbDhp64KtjD2Wjg380
 4R8hO0BOywY4BdqnKZmR4R5CIHA4yzyvMEFdB5GTJrMedqOmw+h4liVqvA8LId1n1RDF
 Xal8mfRaLtJVD/CkjVsf7y95egC7C3565gKpasJfZsrL5cjA5QDdrI20eWNMpo8mDBM9
 LeMA==
X-Forwarded-Encrypted: i=1;
 AJvYcCWzwvZglA4G4yhJMV/T7My8TsZluD0C4e3CFPs1ugDumAofz5Nv6G51KtKGJzD7kCkUzt4YOg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzWnu7lVaKozpM+SaYHSZFjSYuJ9+qH5sLSI7yaknVl/7WB7L7K
 Sg05QkqzjGXmJZlbt3e7eIWBqIMfWNwhf7d1BKNGiH3+eTgRr86vrlKr3saxT2TOV+C7GtzlzRG
 VlY9J7UJSnYLV4maxn2imEgKOD0k=
X-Gm-Gg: ASbGnctkzH1yyOoOuPr0Vro+202EwAlc4qr8CyC2A34b83hUYObyEgvPwVNRKvSriz+
 NUKDzDIzyfoh+Xi8eiV5kS9GF1UsTFEHw3OuYikuD
X-Google-Smtp-Source: AGHT+IEq1hzw3w50EXpIssDuBI/eJkCoXCsdbNYPhnrU4zOhhOzTbCLx61INFjuHHOjEzzhKp7Na5MkPOeG52fSY52I=
X-Received: by 2002:a05:6402:430f:b0:5d1:2631:b88a with SMTP id
 4fb4d7f45d1cf-5d81ddacf87mr31203269a12.17.1735798359324; Wed, 01 Jan 2025
 22:12:39 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Thu, 2 Jan 2025 00:12:39 -0600
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <877c8jf1qd.fsf@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN>
 <-9CYv1jXFzOpWe6WlJ_GVtAFtexLt4j0Jt62SEVC1ZGfDVmnzJSSGXQRqm2n47k9r1rLrCdBdaXxf9QEjXrQUSDFhT1iXyHqgYHmAy9t0Uc=@rjt.dev>
 <877c8jf1qd.fsf@HIDDEN>
MIME-Version: 1.0
Date: Thu, 2 Jan 2025 00:12:39 -0600
Message-ID: <CADwFkmmP1aMZdwH2pcBGS1cXkSZK81-zMMbbPgsBNwCky8KuSg@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>,
 Randy Taylor <dev@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tag 74461 + pending
thanks

Gabriel Santos via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

>> Thanks for working on this! The patch looks good to me.
>
> And it will be able to be merged soon! I just got my FSF paper today,
> will be signing it tomorrow.

Great, thanks.  I'm tagging this as pending for now.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 02:24:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 21:24:56 2025
Received: from localhost ([127.0.0.1]:41493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTAtL-0003V0-IW
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 21:24:56 -0500
Received: from layka.disroot.org ([178.21.23.139]:60312)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tTAtG-0003Uk-Iy
 for 74461 <at> debbugs.gnu.org; Wed, 01 Jan 2025 21:24:54 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id CCC9B25A96;
 Thu,  2 Jan 2025 03:24:48 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id 8rIoxGp4vBp7; Thu,  2 Jan 2025 03:24:44 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1735784684; bh=Nu+zJi/J8sgDXggJgByKGjNEL0XT0nZgaiCr03Wjt/M=;
 h=From:To:Cc:Subject:Date;
 b=XAJ3MJ2C1DbKdcJFOEnZDBjlmXtReW7oZ2vWexexPGFJX9xUI7WZqhcr1A8VtTRf5
 HV2XPYA4W2vBI0CVp5HOc1T/iCOc3Mi0xA1OcAcIcwklp5E0mmc9VS417ObbOALcBM
 69aj7dOOaK8EGp7J+cXf07llXVkoevE1GIYA02zqlqh7krPc7kcrWmf7A5l8V3wU0X
 hJ6I1+t1y9kPdE1dmlQeuWZwytJojB7oTTPx9hqd5v3GjalkUjDFtbDhIwL5D8k8i2
 /UdVXQS4oZMwR7bD3k3hARrcCgijgviri9TTOQKBfOFTAUznNA5vQIJlEQ2ebtCuyu
 Ini5knTPG3SFA==
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: 74461 <at> debbugs.gnu.org
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Date: Wed, 01 Jan 2025 23:24:38 -0300
Message-ID: <8734i2c5qx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Randy Taylor <dev@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain


Updated the patch to follow the suggestions made by Randy:

- Rename go-mod-ts-mode--in-directive-p
- Add latest grammar versions of go-mod and go-work
- Removed the mention of the now defunct go-work-ts-mode--syntax-table
- Added back the syntax table for the regular Go tree-sitter mode

--
Gabriel Santos


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0001-Add-go-work-ts-mode.patch
Content-Description: [PATCH] Add go-work-ts-mode

From 1ef854544261118bb4c3db08e76ed611157a424f Mon Sep 17 00:00:00 2001
From: Gabriel <gabrielsantosdesouza@HIDDEN>
Date: Wed, 20 Nov 2024 23:07:28 -0300
Subject: [PATCH] Add go-work-ts-mode

* admin/notes/tree-sitter/build-module/batch.sh:
(languages):
* admin/notes/tree-sitter/build-module/build.sh:
(grammardir):
Add go-work support.
* etc/NEWS:
Mention go-work-ts-mode.
* lisp/progmodes/eglot.el:
(eglot-server-programs):
Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode.el:
Commentary:
Add the repositories for the grammars to
the commentary section.
(go-work-ts-mode--indent-rules):
(go-work-ts-mode--keywords):
(go-work-ts-mode--font-lock-settings):
New variables.
(go-work-ts-mode--directive-matcher):
(go-work-ts-mode):
New functions.
(go-mod-ts-mode--in-directive-p):
Rename it to go-mod-ts-mode--directive-matcher.
Be more specific on the directive location (modules).
Replace mention of nil with function.
Use member instead of pcase to check node types.
* test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go:
* test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts:
* test/lisp/progmodes/go-ts-mode-resources/indent-work.erts:
New files for testing indentation and font-locking for Go
module and workspace files.
* test/lisp/progmodes/go-ts-mode-tests.el:
Add tests for Go module and workspace files.
---
 admin/notes/tree-sitter/build-module/batch.sh |   1 +
 admin/notes/tree-sitter/build-module/build.sh |   5 +
 etc/NEWS                                      |   6 +
 lisp/progmodes/eglot.el                       |   2 +-
 lisp/progmodes/go-ts-mode.el                  | 113 ++++++++++++++++--
 .../go-ts-mode-resources/font-lock-package.go |   4 +
 .../go-ts-mode-resources/indent-mod.erts      |  16 +++
 .../go-ts-mode-resources/indent-work.erts     |  16 +++
 test/lisp/progmodes/go-ts-mode-tests.el       |  24 ++++
 9 files changed, 176 insertions(+), 11 deletions(-)
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/indent-work.erts

diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh
index 012b5882e83..1b5214267f5 100755
--- a/admin/notes/tree-sitter/build-module/batch.sh
+++ b/admin/notes/tree-sitter/build-module/batch.sh
@@ -11,6 +11,7 @@ languages=(
     'elixir'
     'go'
     'go-mod'
+    'go-work'
     'heex'
     'html'
     'java'
diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index 9a567bb094d..4f3c6da3c5f 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -39,6 +39,11 @@ case "${lang}" in
         lang="gomod"
         org="camdencheek"
         ;;
+    "go-work")
+        # The parser is called "gowork".
+        lang="gowork"
+        org="omertuc"
+        ;;
     "heex")
         org="phoenixframework"
         ;;
diff --git a/etc/NEWS b/etc/NEWS
index 1a6f5ae7816..55ad36fbc30 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1166,6 +1166,12 @@ means of the GDI+ library.
 In addition to ':file FILE' for playing a sound from a file, ':data
 DATA' can now be used to play a sound from memory.
 
+---
+** New major mode 'go-work-ts-mode'.
+A major mode based on the tree-sitter library for editing "go.work"
+files.  If tree-sitter is properly set-up by the user, it can be
+enabled for files named "go.work".
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index d4e40791e86..f31d0f41d21 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -280,7 +280,7 @@ automatically)."
     (elm-mode . ("elm-language-server"))
     (mint-mode . ("mint" "ls"))
     ((kotlin-mode kotlin-ts-mode) . ("kotlin-language-server"))
-    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode)
+    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode go-work-ts-mode)
      . ("gopls"))
     ((R-mode ess-r-mode) . ("R" "--slave" "-e"
                             "languageserver::run()"))
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 1ea49e72f07..c82deb1f4e2 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -26,6 +26,8 @@
 ;;
 ;; go-ts-mode is known to work with the following languages and version:
 ;; - tree-sitter-go: v0.23.4-1-g12fe553
+;; - tree-sitter-go-mod: v1.1.0-3b01edce
+;; - tree-sitter-go-work: 949a8a47
 ;;
 ;; We try our best to make builtin modes work with latest grammar
 ;; versions, so a more recent grammar version has a good chance to work.
@@ -33,6 +35,9 @@
 
 ;;; Commentary:
 ;;
+;; Go uses tabs as a convention for indentation:
+;; https://go.dev/doc/effective_go#formatting
+;; so `indent-tabs-mode' is enabled for the modes.
 
 ;;; Code:
 
@@ -462,7 +467,7 @@ be run."
                    (go-ts-mode--get-build-tags-flag)
                    default-directory)))
 
-;; go.mod support.
+;;;; go.mod support.
 
 (defvar go-mod-ts-mode--syntax-table
   (let ((table (make-syntax-table)))
@@ -479,12 +484,12 @@ be run."
      ((parent-is "replace_directive") parent-bol go-ts-mode-indent-offset)
      ((parent-is "require_directive") parent-bol go-ts-mode-indent-offset)
      ((parent-is "retract_directive") parent-bol go-ts-mode-indent-offset)
-     ((go-mod-ts-mode--in-directive-p) no-indent go-ts-mode-indent-offset)
+     ((go-mod-ts-mode--directive-matcher) no-indent go-ts-mode-indent-offset)
      (no-node no-indent 0)))
   "Tree-sitter indent rules for `go-mod-ts-mode'.")
 
-(defun go-mod-ts-mode--in-directive-p ()
-  "Return non-nil if point is inside a directive.
+(defun go-mod-ts-mode--directive-matcher ()
+  "Return a function for determining if point is inside a Go module directive.
 When entering an empty directive or adding a new entry to one, no node
 will be present meaning none of the indentation rules will match,
 because there is no parent to match against.  This function determines
@@ -494,12 +499,12 @@ what the parent of the node would be if it were a node."
       (save-excursion
         (backward-up-list)
         (back-to-indentation)
-        (pcase (treesit-node-type (treesit-node-at (point)))
-          ("exclude" t)
-          ("module" t)
-          ("replace" t)
-          ("require" t)
-          ("retract" t))))))
+        (member (treesit-node-type (treesit-node-at (point)))
+                '("exclude"
+                  "module"
+                  "replace"
+                  "require"
+                  "retract"))))))
 
 (defvar go-mod-ts-mode--keywords
   '("exclude" "go" "module" "replace" "require" "retract")
@@ -566,6 +571,94 @@ what the parent of the node would be if it were a node."
 (if (treesit-ready-p 'gomod)
     (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
 
+;;;; go.work support.
+
+(defvar go-work-ts-mode--indent-rules
+  `((gowork
+     ((node-is ")") parent-bol 0)
+     ((parent-is "replace_directive") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "use_directive") parent-bol go-ts-mode-indent-offset)
+     ((go-work-ts-mode--directive-matcher) no-indent go-ts-mode-indent-offset)
+     (no-node no-indent 0)))
+  "Tree-sitter indent rules for `go-work-ts-mode'.")
+
+(defun go-work-ts-mode--directive-matcher ()
+  "Return a function for determining if point is inside a Go workspace directive.
+When entering an empty directive or adding a new entry to one, no node
+will be present meaning none of the indentation rules will match,
+because there is no parent to match against.  This function determines
+what the parent of the node would be if it were a node."
+  (lambda (node _ _ &rest _)
+    (unless (treesit-node-type node)
+      (save-excursion
+        (backward-up-list)
+        (back-to-indentation)
+        (member (treesit-node-type (treesit-node-at (point)))
+                '("replace"
+                  "use"))))))
+
+(defvar go-work-ts-mode--keywords
+  '("go" "replace" "use")
+  "go.work keywords for tree-sitter font-locking.")
+
+(defvar go-work-ts-mode--font-lock-settings
+  (treesit-font-lock-rules
+   :language 'gowork
+   :feature 'bracket
+   '((["(" ")"]) @font-lock-bracket-face)
+
+   :language 'gowork
+   :feature 'comment
+   '((comment) @font-lock-comment-face)
+
+   :language 'gowork
+   :feature 'keyword
+   `([,@go-work-ts-mode--keywords] @font-lock-keyword-face)
+
+   :language 'gowork
+   :feature 'number
+   '([(go_version) (version)] @font-lock-number-face)
+
+   :language 'gowork
+   :feature 'operator
+   '((["=>"]) @font-lock-operator-face)
+
+   :language 'gowork
+   :feature 'error
+   :override t
+   '((ERROR) @font-lock-warning-face))
+  "Tree-sitter font-lock settings for `go-work-ts-mode'.")
+
+;;;###autoload
+(define-derived-mode go-work-ts-mode prog-mode "Go Work"
+  "Major mode for editing go.work files, powered by tree-sitter."
+  :group 'go
+
+  (when (treesit-ready-p 'gowork)
+    (setq treesit-primary-parser (treesit-parser-create 'gowork))
+
+    ;; Comments.
+    (setq-local comment-start "// ")
+    (setq-local comment-end "")
+    (setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
+
+    ;; Indent.
+    (setq-local indent-tabs-mode t
+                treesit-simple-indent-rules go-work-ts-mode--indent-rules)
+
+    ;; Font-lock.
+    (setq-local treesit-font-lock-settings go-work-ts-mode--font-lock-settings)
+    (setq-local treesit-font-lock-feature-list
+                '((comment)
+                  (keyword)
+                  (number)
+                  (bracket error operator)))
+
+    (treesit-major-mode-setup)))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode))
+
 (provide 'go-ts-mode)
 
 ;;; go-ts-mode.el ends here
diff --git a/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go b/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
new file mode 100644
index 00000000000..7bee6848810
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
@@ -0,0 +1,4 @@
+replace gnu.org/go/package1 v1.0.0 => gnu.org/go/package2 v1.0.0
+// ^ font-lock-keyword-face
+//                             ^ font-lock-number-face
+//                                 ^ font-lock-operator-face
diff --git a/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts b/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
new file mode 100644
index 00000000000..2f7bfd9030b
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
@@ -0,0 +1,16 @@
+Code:
+  (lambda ()
+    (go-mod-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Point-Char: |
+
+Name: Basic
+
+=-=
+require (
+	gnu.org/go/package1 v1.0.0
+	gnu.org/go/package2 v1.0.0
+)
+
+=-=-=
diff --git a/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts b/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts
new file mode 100644
index 00000000000..b210974cedc
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts
@@ -0,0 +1,16 @@
+Code:
+  (lambda ()
+    (go-work-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Point-Char: |
+
+Name: Basic
+
+=-=
+use (
+	./package1
+	./package2
+)
+
+=-=-=
diff --git a/test/lisp/progmodes/go-ts-mode-tests.el b/test/lisp/progmodes/go-ts-mode-tests.el
index 2837d5d23d2..7a4d7453799 100644
--- a/test/lisp/progmodes/go-ts-mode-tests.el
+++ b/test/lisp/progmodes/go-ts-mode-tests.el
@@ -23,6 +23,8 @@
 (require 'ert-x)
 (require 'treesit)
 
+;; go-ts-mode
+
 (ert-deftest go-ts-mode-test-indentation ()
   (skip-unless (treesit-ready-p 'go))
   (ert-test-erts-file (ert-resource-file "indent.erts")))
@@ -32,5 +34,27 @@
   (let ((treesit-font-lock-level 4))
     (ert-font-lock-test-file (ert-resource-file "font-lock.go") 'go-ts-mode)))
 
+;; go-mod-ts-mode
+
+(ert-deftest go-work-ts-mode-test-indentation ()
+  (skip-unless (treesit-ready-p 'gomod))
+  (ert-test-erts-file (ert-resource-file "indent-mod.erts")))
+
+(ert-deftest go-mod-ts-test-font-lock ()
+  (skip-unless (treesit-ready-p 'gomod))
+  (let ((treesit-font-lock-level 4))
+    (ert-font-lock-test-file (ert-resource-file "font-lock-package.go") 'go-mod-ts-mode)))
+
+;; go-work-ts-mode
+
+(ert-deftest go-work-ts-mode-test-indentation ()
+  (skip-unless (treesit-ready-p 'gowork))
+  (ert-test-erts-file (ert-resource-file "indent-work.erts")))
+
+(ert-deftest go-work-ts-test-font-lock ()
+  (skip-unless (treesit-ready-p 'gowork))
+  (let ((treesit-font-lock-level 4))
+    (ert-font-lock-test-file (ert-resource-file "font-lock-package.go") 'go-work-ts-mode)))
+
 (provide 'go-ts-mode-tests)
 ;;; go-ts-mode-tests.el ends here
-- 
2.47.1


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 01:53:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 20:53:40 2025
Received: from localhost ([127.0.0.1]:41291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTAP6-0001tt-9m
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 20:53:40 -0500
Received: from layka.disroot.org ([178.21.23.139]:51534)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tTAP3-0001tj-E0
 for 74461 <at> debbugs.gnu.org; Wed, 01 Jan 2025 20:53:38 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id B4D9E25963;
 Thu,  2 Jan 2025 02:53:35 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id qh3OeaONLFVj; Thu,  2 Jan 2025 02:53:35 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1735782815; bh=yOTbgaNC2Hph+eysHtnQhQ25nMprDRujnDhgm7iyYC8=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=DP7gHlqIpRzLsYRnshixnkfIwHITZzLhD8u/o2oczKFsLHCNNpBeFMPfd1WxJ33uz
 jDfGSXxRLhzmm8Ccv21eDibzb6+ALHehCElKjBqhO/UwWilm0UgpblYAVzshqxVb52
 oDjtnA7iUNKGdQ6cnuwv+qffaGmw1t37bxnWHeif59ocY8EJvGs+AKxq6ZW5ka6tY4
 z9AuNhI+izJMkrTv42VjQYo3PPjzNNHeKm+e0JfiDE6bBLTGGJ6zHpidiJ67Q9zlye
 HdHfq/ae6wm2l3lm0fHwyF4LR4JJpj3zOmL4X0mmihubz+7cCBw7uC89DlaA54qUQE
 ID//66WPYWuOQ==
Date: Wed, 01 Jan 2025 22:53:27 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <JC8uBkNgHc2L0Nb6Bmz2YhUww1-6wsyNmLaEQeBN3Ixbm79oda_mq8EUM1vKAivlDPE9ihbK7t9gaj4LfsAQ_oSmek0Xff4XW_2rTGX17KE=@rjt.dev>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
 <69C7AB3A-F058-4EBC-922E-3C24D1F4A9CB@HIDDEN>
 <0F06447F-3926-4F70-86F0-5F512598A362@HIDDEN>
 <JC8uBkNgHc2L0Nb6Bmz2YhUww1-6wsyNmLaEQeBN3Ixbm79oda_mq8EUM1vKAivlDPE9ihbK7t9gaj4LfsAQ_oSmek0Xff4XW_2rTGX17KE=@rjt.dev>
Message-ID: <55A46329-AD57-4C1D-9CA2-22B8D30C3391@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>Thanks, I've got a few comments=2E
>
>Recently, a commentary section:
>;;; Tree-sitter language versions
>was added to go-ts-mode=2E Perhaps you can adapt what you wrote in
>the commentary section to that?

I can, just need to do a quick rebase=2E

>-  :syntax-table go-ts-mode--syntax-table
>Did you mean to remove this for go-work-ts-mode instead?
>The commit also mentions `go-work-ts-mode--syntax-table'
>which doesn't exist anymore=2E

Oops, thanks, I'll add ot back and remove the syntax table from the change=
log=2E

--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 00:57:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 19:57:35 2025
Received: from localhost ([127.0.0.1]:40964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT9Wo-0007Mz-LC
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 19:57:34 -0500
Received: from layka.disroot.org ([178.21.23.139]:48958)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tT9Wl-0007Mp-Su
 for 74461 <at> debbugs.gnu.org; Wed, 01 Jan 2025 19:57:32 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 0A454258F0;
 Thu,  2 Jan 2025 01:57:30 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id VEwut4JAbsW1; Thu,  2 Jan 2025 01:57:29 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1735779449; bh=H9nt1ODcAKZ84acs9vFdDuWf6XDnaP/SCdx+0eGfXPg=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=D0NUEa9KmQ2g0qI2RtLqJjUdSkMNGBa3gx8K16ojtnMpak64lDDdMpt9V+drADN2b
 3jfJlTZ9MaOgY0K9VOo2N3pO8niupP0nI2OlywQap4mVVxPIGK6DbMSfL+9iv4/yDp
 W9dG77lG12/j3TDUWZXJV/xSabsgo8AgiyRjXb32d9DumP2rVd9b710xYJt3tA3Gmf
 DTx0yPziy7qfPMfmiRRsvScpFLwBMqaYr5IpFqCjrBrA6lUw7wgDpfwowcoAFSbLVE
 w3JVI5qB77apd9rLvD+5wF1yhIAhrGkteBMOPEQ//63PgUqdLIZC/8fkyhAvCaGuI1
 ot6xYlxvY8qKw==
Date: Wed, 01 Jan 2025 21:57:22 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <SRBhXDXKO1-8ACSmwSc-slozNDUfQ6J_dYIv4iJwYFfMj7nOm88M0nTvcIDzWCcMA_uHTtyxAzRptUaugSXJeMJB3kweSzXGWy9Yv81B6S4=@rjt.dev>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
 <SRBhXDXKO1-8ACSmwSc-slozNDUfQ6J_dYIv4iJwYFfMj7nOm88M0nTvcIDzWCcMA_uHTtyxAzRptUaugSXJeMJB3kweSzXGWy9Yv81B6S4=@rjt.dev>
Message-ID: <29457523-E79F-47B1-A22B-37E6600A46A4@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>I probably forgot to update the docstring or something=2E
>`go-mod-ts-mode--in-directive-p' and the go-work equivalent
>should probably be renamed to `go-mod-ts-mode--directive-matcher'=2E

Thanks, with that the last issue was addressed=2E

I'll mail in the updated patch still today=2E

--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 00:53:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 19:53:15 2025
Received: from localhost ([127.0.0.1]:40957 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT9Sc-0007Az-Sf
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 19:53:15 -0500
Received: from mail-4018.proton.ch ([185.70.40.18]:20777)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dev@HIDDEN>) id 1tT9SZ-0007Ak-6Q
 for 74461 <at> debbugs.gnu.org; Wed, 01 Jan 2025 19:53:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev;
 s=protonmail3; t=1735779184; x=1736038384;
 bh=jU4w4+HXe/d6OdfHVrLK1u3iKVtdygxBte96hHjf9EE=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=RVnZX9asqQ7LHZ/VrUpvFrfJdTtLC0BsS0dYFw6VbFkrOAFj+8HRuY029PEu94JO1
 R+NUF90DrcQUCeQXU9iDbsblMQW1cy0aRgrBro559Or0DY8MOooIYsWGDBmU4d6keo
 A7zJkG14gBDPZiYi7ewuPRbbWrrRbqLi0Q61NNPQsGm7hyPEc49sHbaRxBbosQwLGF
 /O+3OdCOJ/W0OkB+wGAh1fQk+j0aNYCbaJnophgD/tbYgbwUA+9JpoSD+n7T1xVvrG
 lpW3ukr88FLUDh575FIZi1L/mBQU7dZhWWsFggY0Jh/J7n43bCRyOTfW1SrennGGXc
 BTXDq6zxJq4AQ==
Date: Thu, 02 Jan 2025 00:53:00 +0000
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
From: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Message-ID: <JC8uBkNgHc2L0Nb6Bmz2YhUww1-6wsyNmLaEQeBN3Ixbm79oda_mq8EUM1vKAivlDPE9ihbK7t9gaj4LfsAQ_oSmek0Xff4XW_2rTGX17KE=@rjt.dev>
In-Reply-To: <0F06447F-3926-4F70-86F0-5F512598A362@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
 <69C7AB3A-F058-4EBC-922E-3C24D1F4A9CB@HIDDEN>
 <0F06447F-3926-4F70-86F0-5F512598A362@HIDDEN>
Feedback-ID: 44397038:user:proton
X-Pm-Message-ID: 00873bd26a705ddf5e63a1948ff3c77a78592d5b
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wednesday, December 25th, 2024 at 15:17, Gabriel Santos <gabrielsantosde=
souza@HIDDEN> wrote:
>=20
>=20
> Actually, since it's not that big of an issue, I'll send in the patch now=
.
>=20
> Em 22 de dezembro de 2024 09:12:21 BRT, Gabriel Santos gabrielsantosdesou=
za@HIDDEN escreveu:
>=20
> > > I'll make the changes you requested and send the updated patch after =
I'm done.
> >=20
> > I just finished updating the patch,
> > but I think it's best to only send it after
> > the point about *--in-directive-p is clarified.

I just replied to that in another email.

> > --
> > Gabriel Santos
>=20
>=20
> --
> Gabriel Santos

Thanks, I've got a few comments.

Recently, a commentary section:
;;; Tree-sitter language versions
was added to go-ts-mode. Perhaps you can adapt what you wrote in
the commentary section to that?

-  :syntax-table go-ts-mode--syntax-table
Did you mean to remove this for go-work-ts-mode instead?
The commit also mentions `go-work-ts-mode--syntax-table'
which doesn't exist anymore.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 2 Jan 2025 00:33:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 19:33:01 2025
Received: from localhost ([127.0.0.1]:40936 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT992-0006Kf-Pm
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 19:33:01 -0500
Received: from mail-10626.protonmail.ch ([79.135.106.26]:16619)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <dev@HIDDEN>) id 1tT990-0006KJ-TT
 for 74461 <at> debbugs.gnu.org; Wed, 01 Jan 2025 19:33:00 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev;
 s=protonmail3; t=1735777971; x=1736037171;
 bh=XkJ7p+HAhrVtp4pDhiD/kUkz5zWLzhosAozwanMS120=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=qHtds6xOpUfxeKiNwzWPBN4GSyHrLEygyG0DW9LCLWRhYotSBtvquBe8oXqsw9EZ7
 9VaFVlc39RHBAQLWj1FQ0FNQXsxpQxpErEH9JoqBGoEB+ZOyz81qq3AJSB3ShVey03
 zYpv9Zc8lU4jBe08Y5OZDZqOMyQ5tOHYWs2xXA9DGDcromLgAZVkx+dTBWhMWsMSJL
 1Pk5uli8Y2Gz0lVeQIt6Ib7cCbGMZSIxlRK4oef22pJNJRO+IRqRdq1QX/Kze1C8dw
 mh4uQz5QR5DOvTOND3kOYFrGDIF32dYLs/jEdG584mBQvqT/463pdMPt9Aq27mpC8C
 BBTjui1QFR+kQ==
Date: Thu, 02 Jan 2025 00:32:45 +0000
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
From: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Message-ID: <SRBhXDXKO1-8ACSmwSc-slozNDUfQ6J_dYIv4iJwYFfMj7nOm88M0nTvcIDzWCcMA_uHTtyxAzRptUaugSXJeMJB3kweSzXGWy9Yv81B6S4=@rjt.dev>
In-Reply-To: <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
Feedback-ID: 44397038:user:proton
X-Pm-Message-ID: 18956a09b84c93bc6d23842a29563b4082154a91
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sunday, December 22nd, 2024 at 06:32, Gabriel Santos <gabrielsantosdesou=
za@HIDDEN> wrote:
> [...]
>
> > > +(defun go-work-ts-mode--in-directive-p ()
> > > + "Return non-nil if point is inside a Go workspace directive.
> >=20
> > This docstring doesn't seem right: the function returns another
> > function, not a boolean.
>=20
>=20
> Huh, that is true (it returns a lambda function).
> Thankfully Randy is CC'ed here, so maybe
> he can comment on that.
>=20

I probably forgot to update the docstring or something.
`go-mod-ts-mode--in-directive-p' and the go-work equivalent
should probably be renamed to `go-mod-ts-mode--directive-matcher'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 25 Dec 2024 20:17:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 25 15:17:42 2024
Received: from localhost ([127.0.0.1]:38953 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tQXp8-0006iS-0V
	for submit <at> debbugs.gnu.org; Wed, 25 Dec 2024 15:17:42 -0500
Received: from layka.disroot.org ([178.21.23.139]:60192)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tQXp5-0006iF-5N
 for 74461 <at> debbugs.gnu.org; Wed, 25 Dec 2024 15:17:40 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 3B0FE258FD;
 Wed, 25 Dec 2024 21:17:37 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id XZM6m0VVktFe; Wed, 25 Dec 2024 21:17:32 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1735157852; bh=efgTn7T0IUAaOn9UDNgMJz4kFvKm3f+qimZy866rpwM=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=TRldNYq+tvysT4XVVxOg9YEwucFDCjnQ3ww4Ehv0U1I8MFbwomQE5NNHwlZZxUpFe
 zn+SaWYHKnv1dQJGrU04c+OhJ0uq/RPRHrr0eyLSiCrPTIpOKO4DZGx3WXwEE6sVtJ
 ZRhViLvAT4bZDGYQoIImwe6eLbpeJCcwYD3rdNzVGzd5ZDmTzA+Dwp/lK0gvCZ8H1D
 SM2LTBZjAOGvW88Oms7QfAfT/EXF5r1FvVQLV5hFdwobgGPNN2WH13sU1dCezxW3VX
 QruEIQOmkod6JI7GK4I/hq6N2bKGVW6g9GFCM/sRXzLNiZ8FEZmlNMn6y8u3Ttp3l5
 qYXCg1wqYvGLw==
Date: Wed, 25 Dec 2024 17:17:25 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <69C7AB3A-F058-4EBC-922E-3C24D1F4A9CB@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
 <69C7AB3A-F058-4EBC-922E-3C24D1F4A9CB@HIDDEN>
Message-ID: <0F06447F-3926-4F70-86F0-5F512598A362@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary=----G6B62CR1G5D5H3AU7ENDMKTU36M4JV
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

------G6B62CR1G5D5H3AU7ENDMKTU36M4JV
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

Actually, since it's not that big of an issue, I'll send in the patch now=
=2E

Em 22 de dezembro de 2024 09:12:21 BRT, Gabriel Santos <gabrielsantosdesou=
za@disroot=2Eorg> escreveu:
>>I'll make the changes you requested and send the updated patch after I'm=
 done=2E
>
>I just finished updating the patch,
>but I think it's best to only send it after
>the point about *--in-directive-p is clarified=2E
>--
>Gabriel Santos

--
Gabriel Santos
------G6B62CR1G5D5H3AU7ENDMKTU36M4JV
Content-Type: text/plain;
 name=0001-Add-go-work-ts-mode.diff
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename=0001-Add-go-work-ts-mode.diff;
 size=12378

RnJvbSBkOGM3N2IwNDRjYWVhN2Y2N2Y3NTU2YmY4MzdmMmRmMzgyNWQyZDdkIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBHYWJyaWVsIDxnYWJyaWVsc2FudG9zZGVzb3V6YUBkaXNyb290
Lm9yZz4KRGF0ZTogV2VkLCAyMCBOb3YgMjAyNCAyMzowNzoyOCAtMDMwMApTdWJqZWN0OiBbUEFU
Q0hdIEFkZCBnby13b3JrLXRzLW1vZGUKCiogYWRtaW4vbm90ZXMvdHJlZS1zaXR0ZXIvYnVpbGQt
bW9kdWxlL2JhdGNoLnNoOgoobGFuZ3VhZ2VzKToKKiBhZG1pbi9ub3Rlcy90cmVlLXNpdHRlci9i
dWlsZC1tb2R1bGUvYnVpbGQuc2g6CihncmFtbWFyZGlyKToKQWRkIGdvLXdvcmsgc3VwcG9ydC4K
KiBldGMvTkVXUzoKTWVudGlvbiBnby13b3JrLXRzLW1vZGUuCiogbGlzcC9wcm9nbW9kZXMvZWds
b3QuZWw6CihlZ2xvdC1zZXJ2ZXItcHJvZ3JhbXMpOgpBZGQgZ28td29yay10cy1tb2RlLgoqIGxp
c3AvcHJvZ21vZGVzL2dvLXRzLW1vZGUuZWw6CkNvbW1lbnRhcnk6CkFkZCB0aGUgcmVwb3NpdG9y
aWVzIGZvciB0aGUgZ3JhbW1hcnMgdG8KdGhlIGNvbW1lbnRhcnkgc2VjdGlvbi4KKGdvLXdvcmst
dHMtbW9kZS0tc3ludGF4LXRhYmxlKToKKGdvLXdvcmstdHMtbW9kZS0taW5kZW50L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XQtcmVhZHktcCAnZ293
b3JrKQorICAgIChzZXRxIHRyZWVzaXQtcHJpbWFyeS1wYXJzZXIgKHRyZWVzaXQtcGFyc2VyLWNy
ZWF0ZSAnZ293b3JrKSkKKworICAgIDs7IENvbW1lbnRzLgorICAgIChzZXRxLWxvY2FsIGNvbW1l
bnQtc3RhcnQgIi8vICIpCisgICAgKHNldHEtbG9jYWwgY29tbWVudC1lbmQgIiIpCisgICAgKHNl
dHEtbG9jYWwgY29tbWVudC1zdGFydC1za2lwIChyeCAiLy8iICgqIChzeW50YXggd2hpdGVzcGFj
ZSkpKSkKKworICAgIDs7IEluZGVudC4KKyAgICAoc2V0cS1sb2NhbCBpbmRlbnQtdGFicy1tb2Rl
IHQKKyAgICAgICAgICAgICAgICB0cmVlc2l0LXNpbXBsZS1pbmRlbnQtcnVsZXMgZ28td29yay10
cy1tb2RlLS1pbmRlbnQtcnVsZXMpCisKKyAgICA7OyBGb250LWxvY2suCisgICAgKHNldHEtbG9j
YWwgdHJlZXNpdC1mb250LWxvY2stc2V0dGluZ3MgZ28td29yay10cy1tb2RlLS1mb250LWxvY2st
c2V0dGluZ3MpCisgICAgKHNldHEtbG9jYWwgdHJlZXNpdC1mb250LWxvY2stZmVhdHVyZS1saXN0
CisgICAgICAgICAgICAgICAgJygoY29tbWVudCkKKyAgICAgICAgICAgICAgICAgIChrZXl3b3Jk
KQorICAgICAgICAgICAgICAgICAgKG51bWJlcikKKyAgICAgICAgICAgICAgICAgIChicmFja2V0
IGVycm9yIG9wZXJhdG9yKSkpCisKKyAgICAodHJlZXNpdC1tYWpvci1tb2RlLXNldHVwKSkpCisK
Kzs7OyMjI2F1dG9sb2FkCisoYWRkLXRvLWxpc3QgJ2F1dG8tbW9kZS1hbGlzdCAnKCIvZ29cXC53
b3JrXFwnIiAuIGdvLXdvcmstdHMtbW9kZSkpCisKIChwcm92aWRlICdnby10cy1tb2RlKQogCiA7
OzsgZ28tdHMtbW9kZS5lbCBlbmRzIGhlcmUKZGl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9kLXRzLW1vZGUpKSkKKworOzsgZ28td29y
ay10cy1tb2RlCisKKyhlcnQtZGVmdGVzdCBnby13b3JrLXRzLW1vZGUtdGVzdC1pbmRlbnRhdGlv
biAoKQorICAoc2tpcC11bmxlc3MgKHRyZWVzaXQtcmVhZHktcCAnZ293b3JrKSkKKyAgKGVydC10
ZXN0LWVydHMtZmlsZSAoZXJ0LXJlc291cmNlLWZpbGUgImluZGVudC13b3JrLmVydHMiKSkpCisK
KyhlcnQtZGVmdGVzdCBnby13b3JrLXRzLXRlc3QtZm9udC1sb2NrICgpCisgIChza2lwLXVubGVz
cyAodHJlZXNpdC1yZWFkeS1wICdnb3dvcmspKQorICAobGV0ICgodHJlZXNpdC1mb250LWxvY2st
bGV2ZWwgNCkpCisgICAgKGVydC1mb250LWxvY2stdGVzdC1maWxlIChlcnQtcmVzb3VyY2UtZmls
ZSAiZm9udC1sb2NrLXBhY2thZ2UuZ28iKSAnZ28td29yay10cy1tb2RlKSkpCisKIChwcm92aWRl
ICdnby10cy1tb2RlLXRlc3RzKQogOzs7IGdvLXRzLW1vZGUtdGVzdHMuZWwgZW5kcyBoZXJlCi0t
CjIuNDcuMAoK

------G6B62CR1G5D5H3AU7ENDMKTU36M4JV--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 23 Dec 2024 03:31:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 22:31:25 2024
Received: from localhost ([127.0.0.1]:52744 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPZAD-00023x-22
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 22:31:25 -0500
Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:50257)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tPZAA-00023d-EM
 for 74461 <at> debbugs.gnu.org; Sun, 22 Dec 2024 22:31:23 -0500
Received: from phl-compute-06.internal (phl-compute-06.phl.internal
 [10.202.2.46])
 by mailfhigh.phl.internal (Postfix) with ESMTP id C02C7114008D;
 Sun, 22 Dec 2024 22:31:16 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-06.internal (MEProxy); Sun, 22 Dec 2024 22:31:16 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1734924676;
 x=1735011076; bh=iTvJBZrN2w6bH2yJA3BChvaxaE90snizeOxNI602LtY=; b=
 gGEBETj5Sa6WP4F4/56dDSw8jPJY0tsT2Kez07NIhZtcZYp3Q/GFFDxmn8XtDxZ8
 2cljyJgO2lX+H0AKbJezvVGr1gII7i45EJh9NYiggQ3H7gX8/AL2qaDwI+04rVjz
 6tRQzCfsuAsXMuwq3n0g1ub9fB2XdRrdo78MBUkJSMSFq9wBWW1YjfAtmoqg3APO
 2vBLxIZvpI6xSphEj7F3zG8aYz/PFjnQWD82wYZqaOnDad+FueE/uH6PRKFSB1q9
 2vkaxbOxD7OxXcGrZBd59Dieax1B424O4nn166bv7eQomNfUziDIq51L5myvw2ZY
 XiR699l0k9UvJ4EUY44tEA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1734924676; x=
 1735011076; bh=iTvJBZrN2w6bH2yJA3BChvaxaE90snizeOxNI602LtY=; b=b
 GR1p+C6EaTXm447NydoDEzcc4hz+Vjvaa9VOtDd8T74GI4QIlO3FCFruwQfbyKBD
 VPhb1Qp+6T2eUMiQV+lZp1zZorKwi0Bln3ZfoyNX9EhSdRbM9wNDF6A5qaPddQyP
 KYxecquKeoq/br706y/7yx91VSysT+DB83yTZnYytmlNcfS+MGs3wP7z2lhMho78
 iSYGKqBD16iXhvN+N5KJ27JjK61v4V+T+gYvcjf1JtwNjGD7EULFCKHPOYdp2KMX
 RLelE8lXnGqf4oR4CkHeYHy5TQw6lpZ9/Tp5rWF2l+CiKjwPfPJ5jILzzz2Lq9c1
 evBee5kg2CR0yXa/YRmXw==
X-ME-Sender: <xms:g9loZ-F35S1bbPs5yUcVTvy44Wi2g5_kLppLgyBSJ_xJe3ozJzuDIA>
 <xme:g9loZ_VMyp3c7ia6RjG8v5iBplFpShheyl0npYiyFJsZtbRDR8buMGramU174qdSv
 Tue3hfGp8TFxRGAUjs>
X-ME-Received: <xmr:g9loZ4I6g09V4FVYJ684LFUk3Zs7y-eA-59KWyK7g5Q23SkMG9Ip5fBeHNybd3neZtAH>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtledgheelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepffeifedvleeukedtgfelieegudfgveekfeejveej
 ffetffeuueeugefhveeiuddvnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsth
 gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhht
 ohhvrdguvghvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtph
 htthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghlrdgtrgdprhgtphhtthho
 pehgrggsrhhivghlshgrnhhtohhsuggvshhouhiirgesughishhrohhothdrohhrghdprh
 gtphhtthhopeguvghvsehrjhhtrdguvghvpdhrtghpthhtohepvghlihiisehgnhhurdho
 rhhgpdhrtghpthhtohepjeeggeeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:g9loZ4EhLLIVGGz2oAcw2tFOACVep2OW1foMTEoGD0JkVAoJkJI1bw>
 <xmx:g9loZ0XuE4At92hQmlCOOiowDeivDbaobxB8A8vdX3nsDWXQICBUKw>
 <xmx:g9loZ7MNEW-JJRVjrTN-AusJbASnuXe5tk4R9cAUco8-NRIGnmBqTw>
 <xmx:g9loZ704M-oe9iuC0OU5MzK3zHSRPAW_FaZLoLU9J0xJZ4uzGQXC9Q>
 <xmx:hNloZ-eqentRAlJSCUPqjs5XC9rhCDeaz3npE00gQoprtzk-JOusLM7F>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 22 Dec 2024 22:31:13 -0500 (EST)
Message-ID: <22538f1e-996d-4115-8948-75cca922244e@HIDDEN>
Date: Mon, 23 Dec 2024 05:31:10 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
To: Stefan Monnier <monnier@HIDDEN>,
 Gabriel Santos <gabrielsantosdesouza@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
 <jwvr05zaggq.fsf-monnier+emacs@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <jwvr05zaggq.fsf-monnier+emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 22/12/2024 17:33, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>>> Do we have a way to tell Eglot which LSP server(s) to use via some
>>> buffer-local var, instead of having to change this centralized
>>> "database"?
>> Looking at the following commits:
>>
>> - 5f56bc1
>> <https://git.savannah.gnu.org/cgit/emacs.git/commit/? 
>> id=5f56bc1cdfcd474dd9cfad07240df6c252abd35c>
>> - e37754f
>> <https://git.savannah.gnu.org/cgit/emacs.git/commit/? 
>> id=e37754fc59bac409881d456a83aa0bf2468c94fb>
>>
>> That doesn't seem to be the case.
> It was a kind of rethorical question: whether we do or not, we*should*
> have such a mechanism and we should use it here.

Just to remind, Eglot is in GNU ELPA, whereas go-work-ts-mode is not 
(same for other ts modes). Preferred language servers tend to change 
over time.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 16:06:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 11:06:09 2024
Received: from localhost ([127.0.0.1]:51597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPOT3-0003pr-3G
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 11:06:09 -0500
Received: from layka.disroot.org ([178.21.23.139]:58210)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tPOSx-0003pf-Ry
 for 74461 <at> debbugs.gnu.org; Sun, 22 Dec 2024 11:06:07 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id B188F25B6C;
 Sun, 22 Dec 2024 17:06:01 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id gyJCT-xaksf0; Sun, 22 Dec 2024 17:05:57 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1734883557; bh=Qa30mwMorDMqPgm61Hd9jRpm7jR/yqGq0N7neRMGIik=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=JBitl2UD+FTN+0EGoXGT/+pUQoax63DO8Y5Ap3M+qubTc4J26Q7/FxvsDcndOcnrV
 9+WgG08K6Vdl5rggbJZje/W4a75EihjuDNwyOcqqIhWjyV7cKw4e++Y0vjDASJY+8s
 cjH3Dq8gIKWBceQl/JIqaxXAM7+R8Ee4cOiP4p5L1cz1RtH/Ys4pQ5MdTKU0T8KEb3
 4tFsCkYNuKb6vbrIHyReNNylVrlKEIAvBCe0gkLgciYyB8pN7USEIPnoSPdzAofGhX
 dgIgWwkPyeJX/wmrwf6Hke9UsvwvgFRCuwNVKia1o37DuRxOQkDnBVA9da0FFHmkuz
 4ox/6eS382E+g==
Date: Sun, 22 Dec 2024 13:05:52 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <jwvr05zaggq.fsf-monnier+emacs@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
 <jwvr05zaggq.fsf-monnier+emacs@HIDDEN>
Message-ID: <A9E064FA-8569-4F41-93A8-3EAE0BD222B8@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>It was a kind of rethorical question: whether we do or not, we *should*
>have such a mechanism and we should use it here=2E

Oh definitely, another point for discussion=2E

>> Go uses tabs for indentation,
>> and spaces for alignment=2E
>[=2E=2E=2E]
>> The language specification doesn't mention
>> that, but I think it should=2E
>> Maybe I should send them an e-mail about that=2E
>
>I don't think the language cares (or should care)=2E  It's only a convent=
ion=2E
>
>But if it's the only convention in use in Go, that's fine: just add
>a link to https://go=2Edev/doc/effective_go#formatting that justifies
>the setting=2E

I added it to the commentary section:

+;; Go uses tabs as a convention for indentation:
+;; https://go=2Edev/doc/effective_go#formatting
+;; so indent-tabs-mode is enabled for the modes=2E

>>>Since we don't have another (non-treesitter) mode for these files, I'd
>>>recommend you go straight for:
>>>
>>>    ;;;###autoload
>>>    (add-to-list 'auto-mode-alist '("/go\\=2Ework\\'" =2E go-work-ts-mo=
de))
>>
>>
>> Sorry if I misunderstand,
>> but that doesn't seem to be the case
>> for other tree-sitter modes=2E
>
>Past practice does not always reflect best practices, especially when
>talking about relatively new practices=2E

I'll change that, but after this is accepted
I'll make this change to the other modes,
CCing emacs-devel and the respective maintainers=2E


--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 15:33:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 10:33:40 2024
Received: from localhost ([127.0.0.1]:51491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPNxc-0002Fs-0h
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 10:33:40 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16031)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1tPNxY-0002Fd-5W
 for 74461 <at> debbugs.gnu.org; Sun, 22 Dec 2024 10:33:38 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 50D1210004C;
 Sun, 22 Dec 2024 10:33:30 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1734881608;
 bh=eBVkS2zJNbvgscBPpWulDSE8r5a+yFuqyR7Y4QZxxjg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=H6RC9i3AvQeX0go3P6FObGn6w2aOelqpB3jWCA01EZhuWkEg6XrO2lthhJS5/WdXh
 JddohmghmmbIFhJEXLeBevA3ZkTawnAsPePgDyOntSuWz1NFwftnC69DxGXMFU/YV9
 IhM3lTKd1Wx+uPxFldcKEQqoiQT7NRtWzHS5Wl91c5RtkBnS1Fc4GEeTdK3uxhrdmI
 lxiAi9YUkv3YacRAuYKt/d2rzRg54C2S8sZm6vTzpvNEmsI10oVjkxjwSWjE7nIccW
 mVg7d6WRnUzw/bdJdveFdPu2DkH8//q8UrQDAA3KhaDnPGBBcdj2bP6EOQRGgu0Bot
 Ns73pmmHGq+Ag==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D4BA1100042;
 Sun, 22 Dec 2024 10:33:28 -0500 (EST)
Received: from asado (unknown [199.119.74.1])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9118C120635;
 Sun, 22 Dec 2024 10:33:28 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN> (Gabriel
 Santos's message of "Sun, 22 Dec 2024 08:32:39 -0300")
Message-ID: <jwvr05zaggq.fsf-monnier+emacs@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
Date: Sun, 22 Dec 2024 10:33:27 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.197 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>Do we have a way to tell Eglot which LSP server(s) to use via some
>>buffer-local var, instead of having to change this centralized
>>"database"?
>
> Looking at the following commits:
>
> - 5f56bc1
> <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5f56bc1cdfcd474dd9cfad07240df6c252abd35c>
> - e37754f
> <https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e37754fc59bac409881d456a83aa0bf2468c94fb>
>
> That doesn't seem to be the case.

It was a kind of rethorical question: whether we do or not, we *should*
have such a mechanism and we should use it here.

> Go uses tabs for indentation,
> and spaces for alignment.
[...]
> The language specification doesn't mention
> that, but I think it should.
> Maybe I should send them an e-mail about that.

I don't think the language cares (or should care).  It's only a convention.
But if it's the only convention in use in Go, that's fine: just add
a link to https://go.dev/doc/effective_go#formatting that justifies
the setting.

>>Since we don't have another (non-treesitter) mode for these files, I'd
>>recommend you go straight for:
>>
>>    ;;;###autoload
>>    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode))
>
>
> Sorry if I misunderstand,
> but that doesn't seem to be the case
> for other tree-sitter modes.

Past practice does not always reflect best practices, especially when
talking about relatively new practices.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 12:12:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 07:12:35 2024
Received: from localhost ([127.0.0.1]:49279 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPKp1-0000ZJ-Cd
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 07:12:35 -0500
Received: from layka.disroot.org ([178.21.23.139]:60484)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tPKoy-0000Z7-Pp
 for 74461 <at> debbugs.gnu.org; Sun, 22 Dec 2024 07:12:34 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 9DCD325C36;
 Sun, 22 Dec 2024 13:12:31 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id C9CJdgxRaisZ; Sun, 22 Dec 2024 13:12:26 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1734869546; bh=I01dF1Rc5dII8W9bXjy8Lzbc0cxmVLVdXFyY0dshBAU=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=IVvexXSXO3qwpvM0MkWzpv1Jsj/B/m6KGdBe2eq+Cu6C8c9S9cr7WLt6e7W+AEAyr
 ak6Z7nP0lwffz43bCvmsdS9BagkxLipZX9oUJHXqjZKVZhuPOl89ywt+jKnGfpuj7M
 shuLHyGu8us7U67KxSW1DrGHbi4LBbHUGAsvugWkj0RY/CWURtv2iR8nVutm76JB3A
 wLSwko8nSZac/4aGxWB2eiUGiHOPN6rpFKDLeo+tVtUHci0ui/3eCwouf3FBGt1qVe
 loBm7GQxBtqwH6Go/WFNnaxmU/wfyWiLOSL+U5tDarDkUfgDczut13eEqlntmGmfVU
 jgpQpb3oiyvdQ==
Date: Sun, 22 Dec 2024 09:12:21 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
 <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
Message-ID: <69C7AB3A-F058-4EBC-922E-3C24D1F4A9CB@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>I'll make the changes you requested and send the updated patch after I'm d=
one=2E

I just finished updating the patch,
but I think it's best to only send it after
the point about *--in-directive-p is clarified=2E
--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 11:32:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 06:32:56 2024
Received: from localhost ([127.0.0.1]:49164 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPKCe-0006qe-5x
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 06:32:56 -0500
Received: from layka.disroot.org ([178.21.23.139]:37074)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tPKCb-0006qR-Hv
 for 74461 <at> debbugs.gnu.org; Sun, 22 Dec 2024 06:32:55 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 30CA225C3E;
 Sun, 22 Dec 2024 12:32:51 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id 21OXX_Ms9P3e; Sun, 22 Dec 2024 12:32:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1734867166; bh=ntH3QNUDReMJ7w5/gnipkKYAdz8v663isrtrPTG/EE4=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=U5XUumwn8N1jsFPvsTPzz9EcZfKDeGezBQiIf7tRQPvLO6NVR1wEGOGz6wiGRX4Pk
 8gq7hNsXOPRw49zs6Y9dtGUqcKNifZRyXjLCPzAggVTrcPbWKMlKswYgXx6Lnjdygi
 Gb2VaDfSnyCpXzxAvXY8vye1p4lGoD5wtSR0M+nq9vd3fo+0/XolJy5tuFRp18q7UK
 ay03dId+fUciaD3ifJyl3I4w4dPs7iF7UopqVgRijuNxnaR/hLMTVNraCZEinUuwUu
 311m8weUZSPQbegDo0soAdzRJLcrXelUxVrlPvOOeaRhJUpl/Zjha4yl0385Dqq1lw
 x4tAYXIwZ6C4g==
Date: Sun, 22 Dec 2024 08:32:39 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <jwva5coctia.fsf-monnier+emacs@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN> <jwva5coctia.fsf-monnier+emacs@HIDDEN>
Message-ID: <1C8B596E-785F-435D-AFEA-A2382FDA6AD8@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> --- a/lisp/progmodes/eglot=2Eel
>> +++ b/lisp/progmodes/eglot=2Eel
>> @@ -273,7 +273,7 @@ automatically)=2E"
>>      (elm-mode =2E ("elm-language-server"))
>>      (mint-mode =2E ("mint" "ls"))
>>      ((kotlin-mode kotlin-ts-mode) =2E ("kotlin-language-server"))
>> -    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mo=
de)
>> +    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mo=
de go-work-ts-mode)
>>       =2E ("gopls"))
>>      ((R-mode ess-r-mode) =2E ("R" "--slave" "-e"
>>                              "languageserver::run()"))
>
>Do we have a way to tell Eglot which LSP server(s) to use via some
>buffer-local var, instead of having to change this centralized
>"database"?

Looking at the following commits:

- 5f56bc1 <https://git=2Esavannah=2Egnu=2Eorg/cgit/emacs=2Egit/commit/?id=
=3D5f56bc1cdfcd474dd9cfad07240df6c252abd35c>
- e37754f <https://git=2Esavannah=2Egnu=2Eorg/cgit/emacs=2Egit/commit/?id=
=3De37754fc59bac409881d456a83aa0bf2468c94fb>

That doesn't seem to be the case=2E

>> @@ -565,6 +568,102 @@ what the parent of the node would be if it were a=
 node=2E"
>>  (if (treesit-ready-p 'gomod)
>>      (add-to-list 'auto-mode-alist '("/go\\=2Emod\\'" =2E go-mod-ts-mod=
e)))
>> =20
>> +;; go=2Ework support=2E
>
>I'd use 3 or more semi-colons here, so it acts as a section separator=2E

I think 4 would be better in this case=2E
That would make these comments sub-sections
Of ";;; Code:"

>> +(defun go-work-ts-mode--in-directive-p ()
>> +  "Return non-nil if point is inside a Go workspace directive=2E
>
>This docstring doesn't seem right: the function returns another
>function, not a boolean=2E

Huh, that is true (it returns a lambda function)=2E
Thankfully Randy is CC'ed here, so maybe
he can comment on that=2E

>> +        (pcase (treesit-node-type (treesit-node-at (point)))
>> +          ("replace" t)
>> +          ("use" t))))))
>
>AKA (member (treesit-node-type (treesit-node-at (point))) '("replace" "us=
e"))

Thanks, It works=2E I'll also update the workspace function=2E

>> +;;;###autoload
>> +(define-derived-mode go-work-ts-mode prog-mode "Go Work"
>> +  "Major mode for editing go=2Ework files, powered by tree-sitter=2E"
>> +  :group 'go
>> +  :syntax-table go-work-ts-mode--syntax-table
>
>Why not use the standard name for the syntax-table (in which case you
>don't even need this `:syntax-table` argument)?

That's how it's done in the workspace
configuration,
but I removed it for work now
and testing by using treesit-explore
on the grammar's corpus shows nothing
out of the elements there=2E

Thanks again=2E

>> +    ;; Indent=2E
>> +    (setq-local indent-tabs-mode t
>> +                treesit-simple-indent-rules go-work-ts-mode--indent-ru=
les)
>
>Is this `indent-tabs-mode` setting required by the definition of the
>go=2Ework syntax/language, or is it a personal preference?  If it's
>a personal preference then it doesn't belong in the major mode, and if
>it's required by the syntax, then say so in a comment (ideally with
>a URL pointing to the relevant part of the language definition)=2E

Go uses tabs for indentation,
and spaces for alignment=2E

This is valid even for workspace files,
as adding more than one package modifies
the use directive to multiple lines
indented with tabs=2E

<https://0x0=2Est/8r82=2Epng>
(tabs added by running go work use, not by me)

<https://go=2Edev/doc/effective_go#formatting>

<https://pkg=2Ego=2Edev/cmd/gofmt>

The language specification doesn't mention
that, but I think it should=2E
Maybe I should send them an e-mail about that=2E

<https://go=2Edev/ref/spec>


>> +(if (treesit-ready-p 'gowork)
>> +    (add-to-list 'auto-mode-alist '("/go\\=2Ework\\'" =2E go-work-ts-m=
ode)))
>
>Since we don't have another (non-treesitter) mode for these files, I'd
>recommend you go straight for:
>
>    ;;;###autoload
>    (add-to-list 'auto-mode-alist '("/go\\=2Ework\\'" =2E go-work-ts-mode=
))


Sorry if I misunderstand,
but that doesn't seem to be the case
for other tree-sitter modes=2E

See rust-ts-mode for instance:

<https://git=2Esavannah=2Egnu=2Eorg/cgit/emacs=2Egit/tree/lisp/progmodes/r=
ust-ts-mode=2Eel?id=3D59367f6a3a9dd7fb30429494b622ebdec94e6e32>

The non-treesitter mode for this language is an external package=2E

And Elixir too:

<https://git=2Esavannah=2Egnu=2Eorg/cgit/emacs=2Egit/tree/lisp/progmodes/e=
lixir-ts-mode=2Eel?id=3D59367f6a3a9dd7fb30429494b622ebdec94e6e32>

Seems like we need further conversation on this topic=2E

I'll make the changes you requested and send the updated patch after I'm d=
one=2E

--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 07:04:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 02:04:42 2024
Received: from localhost ([127.0.0.1]:48848 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPG13-0002h5-WC
	for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 02:04:42 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tPG11-0002gr-NJ
 for 74461 <at> debbugs.gnu.org; Sun, 22 Dec 2024 02:04:40 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tPG0v-0005mW-1I; Sun, 22 Dec 2024 02:04:33 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=FvTbODGWmC93Vv0FtE5crhuLjqk3r0DS4AH+VXNHGm4=; b=qzlpok90uEgS
 34lb4BWzEpXqWYnW3tHESsVAEpZfD5P+/C6PJtgZF2jThRaMoPerWHt9wNULkxcC08V25b8MNvFdZ
 /OzhQy1VA/nOVNQiuw/GuGgL+2XkMz+8dFwVsJNV8bWhxcFkq6B1Gp6hR0+yRIOIlLXyaaWImQj3I
 YeQ6GmMrie5Azl94G5aXN0rtBtqSJcj4TwocAOOXp+0uc5bMFYJuTC8DtQKEwPmIYVimWSGb9QeM3
 0iAuFmUEPHBBn92K3Z5OWGngrCdgAv6JuagcFjQ3HmEF8gOzEJRk8q4uXdMtR44+/dH9QI+AEmcDw
 cmKXwGCggB3cOmMki6Bq8g==;
Date: Sun, 22 Dec 2024 09:04:30 +0200
Message-Id: <867c7s6vwh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
In-Reply-To: <366F9848-F537-48B0-AE24-2AA6E8066445@HIDDEN> (message from
 Gabriel Santos on Sat, 21 Dec 2024 23:33:39 -0300)
Subject: Re: bug#74461: [PACH] Add go-work-ts-mode
References: <366F9848-F537-48B0-AE24-2AA6E8066445@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74461
Cc: monnier@HIDDEN, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 21 Dec 2024 23:33:39 -0300
> From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
> CC: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
> 
> Greetings,
> 
> As of 2024-12-01, my copyright to the FSF has been signed.
> I checked if any recent changes would require modifying
> this patch and didn't found any,
> so unless there's additional comments from Stefan this can be merged.
> 
> Sorry for my delay on this,
> I had issues with multiple mail clients not delivering mail.
> 
> Hopefully this messages actually reaches
> the mailing list.

Please rebase the patch on the current master branch and post the
result, with the commit log message.  Then we can install this.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 03:11:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 22:11:06 2024
Received: from localhost ([127.0.0.1]:48572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPCMz-0008QG-Jb
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 22:11:05 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52000)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1tPCMw-0008Ph-VF
 for 74461 <at> debbugs.gnu.org; Sat, 21 Dec 2024 22:11:03 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 83A0580834;
 Sat, 21 Dec 2024 22:10:57 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1734837056;
 bh=sqGQLrsHM/2DP9TIKDw4jNuxRYE2j37Ih+OIilW5A/Q=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=jCJRI08wAHdxl6BZPaRIeYQ583z/5a41SkEG62kSjBSbF63f11dc3jXdC60AuXDW7
 PSwr3InYO5G7oSoEvekOKfLJOPE6mYXbJR5OZ85FQ6qulFX8vxydAX8cbKCrloU8nQ
 Xlq0o2SUX30Lf9Lg4AlcT6KyFrqptboSVBagTMRq+nQp0fGsYqJ9swiaIG+TpS3iT6
 rwB2Te6k9zeRK0ft9EJkO8EDosZuszjN/hKhXjrX3xdDRypH6bBQRIOF6paDGM2cnJ
 CIG34BrhWgU69eGeisemSW9S926YPa6nK0of7v4Py5kt1BBHTN3R6Dys0VUaRdHjx2
 J0HsBWXQQ1eYA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4EA49804E6;
 Sat, 21 Dec 2024 22:10:56 -0500 (EST)
Received: from asado (unknown [199.119.74.1])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 03BD012025A;
 Sat, 21 Dec 2024 22:10:55 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <877c8l55he.fsf@HIDDEN> (Gabriel Santos's message of "Sat,
 30 Nov 2024 08:24:45 -0300")
Message-ID: <jwva5coctia.fsf-monnier+emacs@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN>
Date: Sat, 21 Dec 2024 22:10:54 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -3.381 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
 KAM_SOMETLD_ARE_BAD_TLD      5 .bar, .beauty, .buzz, .cam, .casa, .cfd, .club,
 .date, .guru, .link, .live, .monster, .online, .press, .pw, .quest, .rest,
 .sbs, .shop, .stream, .top, .trade, .wiki, .work, .xyz TLD abuse
 PDS_OTHER_BAD_TLD       1.999 Untrustworthy TLDs
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -273,7 +273,7 @@ automatically)."
>      (elm-mode . ("elm-language-server"))
>      (mint-mode . ("mint" "ls"))
>      ((kotlin-mode kotlin-ts-mode) . ("kotlin-language-server"))
> -    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode)
> +    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode go-work-ts-mode)
>       . ("gopls"))
>      ((R-mode ess-r-mode) . ("R" "--slave" "-e"
>                              "languageserver::run()"))

Do we have a way to tell Eglot which LSP server(s) to use via some
buffer-local var, instead of having to change this centralized
"database"?

> @@ -565,6 +568,102 @@ what the parent of the node would be if it were a node."
>  (if (treesit-ready-p 'gomod)
>      (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
>  
> +;; go.work support.

I'd use 3 or more semi-colons here, so it acts as a section separator.

> +(defvar go-work-ts-mode--syntax-table
> +  (let ((table (make-syntax-table)))
> +    (modify-syntax-entry ?/   ". 124b" table)
> +    (modify-syntax-entry ?\n  "> b"    table)
> +    table)
> +  "Syntax table for `go-work-ts-mode'.")

The "4" above is weird since there's no "3".  Similarly, the use of "b"
is a bit odd since the "normal" comment is unused.

> +(defun go-work-ts-mode--in-directive-p ()
> +  "Return non-nil if point is inside a Go workspace directive.

This docstring doesn't seem right: the function returns another
function, not a boolean.

> +        (pcase (treesit-node-type (treesit-node-at (point)))
> +          ("replace" t)
> +          ("use" t))))))

AKA (member (treesit-node-type (treesit-node-at (point))) '("replace" "use"))

> +;;;###autoload
> +(define-derived-mode go-work-ts-mode prog-mode "Go Work"
> +  "Major mode for editing go.work files, powered by tree-sitter."
> +  :group 'go
> +  :syntax-table go-work-ts-mode--syntax-table

Why not use the standard name for the syntax-table (in which case you
don't even need this `:syntax-table` argument)?

> +    ;; Indent.
> +    (setq-local indent-tabs-mode t
> +                treesit-simple-indent-rules go-work-ts-mode--indent-rules)

Is this `indent-tabs-mode` setting required by the definition of the
go.work syntax/language, or is it a personal preference?  If it's
a personal preference then it doesn't belong in the major mode, and if
it's required by the syntax, then say so in a comment (ideally with
a URL pointing to the relevant part of the language definition).

> +(if (treesit-ready-p 'gowork)
> +    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))

Since we don't have another (non-treesitter) mode for these files, I'd
recommend you go straight for:

    ;;;###autoload
    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode))


- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Dec 2024 02:33:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 21:33:50 2024
Received: from localhost ([127.0.0.1]:48518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tPBmw-0006fs-4I
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 21:33:50 -0500
Received: from layka.disroot.org ([178.21.23.139]:54830)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tPBmu-0006fg-1z
 for 74461 <at> debbugs.gnu.org; Sat, 21 Dec 2024 21:33:48 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id B582625AC7;
 Sun, 22 Dec 2024 03:33:46 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id qP9tCiT2DVoR; Sun, 22 Dec 2024 03:33:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1734834826; bh=m/fZ5lLtpGRQk+kgeAvDWq1pGsCfL2XoAYO4s7+mw54=;
 h=Date:From:To:CC:Subject;
 b=i2Z9I+zuiExsroreqF4649TaAB9BTFVmc1Vy9pymEl0s2oz+qADymQIZ5UvKjbbOi
 aNBVsxlXX1FDfxnjxd7C9nDF4QaSxgt1d2GW46E8IJHqT53r1FXnyuEeHqUerh9Rr1
 p7G6oiJh8JgL0u/M1PWnOXUmmhVQrtoGCMwxqLR1l8rVcFxvw6OdefRi1fPdPtyAvN
 LXma7lIJKBIJ3tr/85Rns8UqonOpJhDtuOQyChvMFVE0TUzzJjPC7Ji6k6XlX1cCLh
 yAhlFbkALO6VwTJddE//fjAl1OSFhxmL76RQCGz9A5fHYXxL9DvzK9ZSiqAkdF4OxU
 OC9zduZg/Qi/Q==
Date: Sat, 21 Dec 2024 23:33:39 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: 74461 <at> debbugs.gnu.org
Subject: Re: bug#74461: [PACH] Add go-work-ts-mode
Message-ID: <366F9848-F537-48B0-AE24-2AA6E8066445@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Greetings,

As of 2024-12-01, my copyright to the FSF has been signed=2E
I checked if any recent changes would require modifying
this patch and didn't found any,
so unless there's additional comments from Stefan this can be merged=2E

Sorry for my delay on this,
I had issues with multiple mail clients not delivering mail=2E

Hopefully this messages actually reaches
the mailing list=2E
--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 18 Dec 2024 22:57:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 17:57:28 2024
Received: from localhost ([127.0.0.1]:36389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO2yt-0006Iy-SP
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 17:57:28 -0500
Received: from layka.disroot.org ([178.21.23.139]:44746)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tO2ys-0006Ir-Ab
 for 74461 <at> debbugs.gnu.org; Wed, 18 Dec 2024 17:57:27 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id E497A21ABA;
 Wed, 18 Dec 2024 23:57:25 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id ImOKd3O8xdbN; Wed, 18 Dec 2024 23:57:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1734562641; bh=8BeUR6uKdNffI63GUtdM5rWCQCAI7N8JSE8+mhYVlX4=;
 h=Date:From:To:Cc:Subject;
 b=DKFKW0xrWwQVnJJBB8YRP/NcmaRG2L5XJyAGnVnIszO/UQoZ1vWCDXpKdoPgTNJ6C
 3EzS9nQVBgfjxYx9yFVaOdz8VwRwIp6N1zEeG8h1uhl4DLX0cOPL5lxzvNXJrgcAME
 WRrFf9/yGrGzU+2CSP3CC35r6Zf4stuCwSDMAh1lYwcdMntKYeUbFarDSd4YTUdZlY
 TtjDuRBysKNLDF4reLGBjDEXMiZPe24LsKhcgosD/NTZIUEOZApNULmDC5BuBSe3ik
 VLF7PrlGK2kTAXSxrZbWVJV72YbBagMt31vavgZd1lJaQawEq8Cx2beWOJ0HU+bcBg
 0OIHxV3IrnZ+A==
Date: Wed, 18 Dec 2024 19:57:17 -0300
Message-Id: <87ldwczjjm.fsf_-_@HIDDEN>
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: 74461 <at> debbugs.gnu.org
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I got an e-mail back from the copyright clerk yesterday.

(This e-mail is from that same day, 2024/12/17. There was an error with
my mail client.)

My copyright is now signed!

I'll check first if there are any major changes related to tree-sitter
that I should update the patch too.

Regards,

--
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 1 Dec 2024 23:01:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 18:01:01 2024
Received: from localhost ([127.0.0.1]:53422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tHsw1-00064W-H7
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2024 18:01:01 -0500
Received: from layka.disroot.org ([178.21.23.139]:41888)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tHsvy-00064C-RQ
 for 74461 <at> debbugs.gnu.org; Sun, 01 Dec 2024 18:00:59 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 71A9D2533B;
 Mon,  2 Dec 2024 00:00:58 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id tMsqRocd02jf; Mon,  2 Dec 2024 00:00:57 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1733094013; bh=HXYOGP1FG//MQPeS7VJJjn2q0jlvbEHaKfIffJxI/jQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=KFJ40gNfALs8W56qo2LZYfSjCbrZhbtfEOW/DRnRaF+bvGNiLkNzmgfviU84/Oo7A
 N+N/3N/OxJIHiWX8I02/nixrvm45ElTk0MFoajPJMPuMmq064JW0njARF3iY91Xhcp
 8lNIt1+BMNtVnF+xPY4YdKJ6t/WGnQDNgbL8Z5y9UFO/1AlEqKjYO6UPbQZg7yy0vk
 EW4Q/OPGYIhv2Rr2x8u6Jd6VZVLgRKOlRvNN+tibB4zggNRBz+Kt8535JcrTPITFnJ
 1iWJVMoIEWjMlv++fQyQz/dmHVXh50wQj1PKtXE3N+aESLjzDiVU/1Uk5OAwpRSYaP
 RLnnpAaOcSGGw==
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <-9CYv1jXFzOpWe6WlJ_GVtAFtexLt4j0Jt62SEVC1ZGfDVmnzJSSGXQRqm2n47k9r1rLrCdBdaXxf9QEjXrQUSDFhT1iXyHqgYHmAy9t0Uc=@rjt.dev>
 (Randy Taylor's message of "Sun, 01 Dec 2024 20:42:55 +0000")
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN>
 <-9CYv1jXFzOpWe6WlJ_GVtAFtexLt4j0Jt62SEVC1ZGfDVmnzJSSGXQRqm2n47k9r1rLrCdBdaXxf9QEjXrQUSDFhT1iXyHqgYHmAy9t0Uc=@rjt.dev>
Date: Sun, 01 Dec 2024 20:00:10 -0300
Message-ID: <877c8jf1qd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Disposition: inline

> Thanks for working on this! The patch looks good to me.

And it will be able to be merged soon! I just got my FSF paper today,
will be signing it tomorrow.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 1 Dec 2024 20:43:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 15:43:10 2024
Received: from localhost ([127.0.0.1]:53213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tHqmb-0007TF-PE
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2024 15:43:10 -0500
Received: from mail-10625.protonmail.ch ([79.135.106.25]:33409)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dev@HIDDEN>) id 1tHqmZ-0007SZ-7i
 for 74461 <at> debbugs.gnu.org; Sun, 01 Dec 2024 15:43:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev;
 s=protonmail3; t=1733085779; x=1733344979;
 bh=npiRvSCKK4DcQr3480et52+ab/Gz6FPAq1Shx4J7HBU=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=Iq7hmxOB81t6valjXS6uQYyaQjdVdCCtpq3pogz1a5f7hdTVbenUGWNLsNnUU3GWl
 J0mcL+FNeXkNLUd1r8OmuoZHplsDhRbT5ZDcF1bIAfvqejxq5O+meVXCmzrrkhEpMc
 5lak/X45QuNqQczjVqMNg1WsjQ3O8X7exeDx5ey0NwLIKZO7UGz+FTU33qX08yv/3f
 BqnbcdbJ9bYs8yCBdnKUl4MxYUI9wfc40lRb1qCGVxZwFOPQP/9hUqOvZIGpzTBBCx
 Amp7SWismUeWIfQJDjzmulkmKUAKHwiaKSWlU4/LW/kHwL85JZ7MZ3R81P0HWV1ZCP
 WPOmT08SY89UA==
Date: Sun, 01 Dec 2024 20:42:55 +0000
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
From: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Message-ID: <-9CYv1jXFzOpWe6WlJ_GVtAFtexLt4j0Jt62SEVC1ZGfDVmnzJSSGXQRqm2n47k9r1rLrCdBdaXxf9QEjXrQUSDFhT1iXyHqgYHmAy9t0Uc=@rjt.dev>
In-Reply-To: <877c8l55he.fsf@HIDDEN>
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
 <877c8l55he.fsf@HIDDEN>
Feedback-ID: 44397038:user:proton
X-Pm-Message-ID: 4fe027a4dbc988e8bf983fe8694496701f7e380e
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Saturday, November 30th, 2024 at 06:24, Gabriel Santos <gabrielsantosdes=
ouza@HIDDEN> wrote:
> > The only comment I have is that for the commit log message:
>=20
> > > * lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
> > > workspace files.
> > > * lisp/progmodes/go-ts-mode: Add the repositories for the grammars to
> > > the commentary section.
> > > * lisp/progmodes/go-ts-mode (go-mod-ts-mode--in-directive-p): Be more
> > > specific on the directive location.
> >=20
> > These should mention the file name only once, and they all should
> > mention the names of functions/variables where the changes were made.
> > For new functions, just list them and say "New functions."
> >=20
> > Also, the lines in the log message are too long: they should
> > preferably be at most 64 columns, and never more than 70.
>=20
>=20
> Thanks, got it, I broke down some of the lines,
> longest one is at 54 columns.
> Both vc and Magit have functions for adding logs to commits,
> really useful:
>=20
> - log-edit-generate-changelog-from-diff
> - magit-commit-add-log
>=20
> > How is your copyright assignment paperwork going? I don't think I saw
> > any responses from the FSF copyright clerk; if more than 2 weeks have
> > passed since you emailed the assignment form, please ping them and CC
> > me.
>=20
>=20
> It has been a week since my first e-mail,
> and five days since the second one.
> I'll add a agenda entry for this to ping and CC you at 2024-12-09
> (2 weeks and 2 days since the first e-mail).
>=20
> > Thanks.
>=20
>=20
> My pleasure, wouldn't be able to contribute to this great software
> without all of the previous work of you and other maintainers and
> contributors.

Thanks for working on this! The patch looks good to me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 30 Nov 2024 11:25:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 30 06:25:00 2024
Received: from localhost ([127.0.0.1]:45714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tHLat-000374-Cg
	for submit <at> debbugs.gnu.org; Sat, 30 Nov 2024 06:25:00 -0500
Received: from layka.disroot.org ([178.21.23.139]:44946)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tHLap-00036s-NX
 for 74461 <at> debbugs.gnu.org; Sat, 30 Nov 2024 06:24:57 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 7803E24CD7;
 Sat, 30 Nov 2024 12:24:53 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id aiQlz0hvBVAS; Sat, 30 Nov 2024 12:24:49 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1732965889; bh=GNGYMx32JpRmllcvs4RsZqcWwIRxet+XC1PyqOPdF1c=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=NCkrbB/noFtgafb+ViffJmu4RIdPe0q2uQUu5sranQjZpj2Pj5gnt0hjq2VTsXCeB
 sIhyXOfEobVbfPugkmNmF27hAqOJUobM0F359vZbCmwvglPfbUkN0TFu3nzvkIgJAm
 c7uT4jNItm27y2EUFN82Dw/R+Uz7T6ouYY4KjzuLkMOTFDWIf4Vdh2FegztABA5Oel
 AkeaxH5Ixt9cnG92rjvSD/c7Ke78c81bs8513ffBQKBrcO8FBjiQftukioklHsaOp5
 bDRIEAIyLI9ER95WjeYOF2g8x/o9yk+X06mH6skmiCswA5dFY6RtW/Y0GcQBi4LWqB
 /iqXlXBN7dCwg==
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
In-Reply-To: <86jzcl81py.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 30 Nov
 2024 12:17:45 +0200")
References: <87ttbzd16p.fsf@HIDDEN> <86jzcl81py.fsf@HIDDEN>
Date: Sat, 30 Nov 2024 08:24:45 -0300
Message-ID: <877c8l55he.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Disposition: inline

> The only comment I have is that for the commit log message:
>
>> * lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
>> workspace files.
>> * lisp/progmodes/go-ts-mode: Add the repositories for the grammars to
>> the commentary section.
>> * lisp/progmodes/go-ts-mode (go-mod-ts-mode--in-directive-p): Be more
>> specific on the directive location.
>
> These should mention the file name only once, and they all should
> mention the names of functions/variables where the changes were made.
> For new functions, just list them and say "New functions."
>
> Also, the lines in the log message are too long: they should
> preferably be at most 64 columns, and never more than 70.

Thanks, got it, I broke down some of the lines,
longest one is at 54 columns.
Both vc and Magit have functions for adding logs to commits,
really useful:

- log-edit-generate-changelog-from-diff
- magit-commit-add-log

> How is your copyright assignment paperwork going?  I don't think I saw
> any responses from the FSF copyright clerk; if more than 2 weeks have
> passed since you emailed the assignment form, please ping them and CC
> me.

It has been a week since my first e-mail,
and five days since the second one.
I'll add a agenda entry for this to ping and CC you at 2024-12-09
(2 weeks and 2 days since the first e-mail).

> Thanks.

My pleasure, wouldn't be able to contribute to this great software
without all of the previous work of you and other maintainers and
contributors.

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0001-Add-go-work-ts-mode.patch

From 9e2cb7c416b6f1184c8f2b4a9dadbcbe77739dbc Mon Sep 17 00:00:00 2001
From: Gabriel <gabrielsantosdesouza@HIDDEN>
Date: Wed, 20 Nov 2024 23:07:28 -0300
Subject: [PATCH] Add go-work-ts-mode

* admin/notes/tree-sitter/build-module/batch.sh:
(languages):
* admin/notes/tree-sitter/build-module/build.sh:
(grammardir):
Add go-work support.
* etc/NEWS:
Mention go-work-ts-mode.
* lisp/progmodes/eglot.el:
(eglot-server-programs):
Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode.el:
Commentary:
Add the repositories for the grammars to
the commentary section.
(go-work-ts-mode--syntax-table):
(go-work-ts-mode--indent-rules):
(go-work-ts-mode--keywords):
(go-work-ts-mode--font-lock-settings):
New variables.
(go-work-ts-mode--in-directive-p):
(go-work-ts-mode):
New functions.
(go-mod-ts-mode--in-directive-p):
Be more specific on the directive location (modules).
* test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go:
* test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts:
* test/lisp/progmodes/go-ts-mode-resources/indent-work.erts:
New files for testing indentation and font-locking for Go
module and workspace files.
* test/lisp/progmodes/go-ts-mode-tests.el:
Add tests for Go module and workspace files.
---
 admin/notes/tree-sitter/build-module/batch.sh |   1 +
 admin/notes/tree-sitter/build-module/build.sh |   5 +
 etc/NEWS                                      |   6 ++
 lisp/progmodes/eglot.el                       |   2 +-
 lisp/progmodes/go-ts-mode.el                  | 101 +++++++++++++++++-
 .../go-ts-mode-resources/font-lock-package.go |   4 +
 .../go-ts-mode-resources/indent-mod.erts      |  16 +++
 .../go-ts-mode-resources/indent-work.erts     |  16 +++
 test/lisp/progmodes/go-ts-mode-tests.el       |  24 +++++
 9 files changed, 173 insertions(+), 2 deletions(-)
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/indent-work.erts

diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh
index 012b5882e83..1b5214267f5 100755
--- a/admin/notes/tree-sitter/build-module/batch.sh
+++ b/admin/notes/tree-sitter/build-module/batch.sh
@@ -11,6 +11,7 @@ languages=(
     'elixir'
     'go'
     'go-mod'
+    'go-work'
     'heex'
     'html'
     'java'
diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index 9a567bb094d..4f3c6da3c5f 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -39,6 +39,11 @@ case "${lang}" in
         lang="gomod"
         org="camdencheek"
         ;;
+    "go-work")
+        # The parser is called "gowork".
+        lang="gowork"
+        org="omertuc"
+        ;;
     "heex")
         org="phoenixframework"
         ;;
diff --git a/etc/NEWS b/etc/NEWS
index b6c21018779..a07d9300fe9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -925,6 +925,12 @@ current buffer, if the major mode supports it.  (Support for
 Transformed images are smoothed using the bilinear interpolation by
 means of the GDI+ library.
 
+---
+** New major mode 'go-work-ts-mode'.
+A major mode based on the tree-sitter library for editing "go.work"
+files.  If tree-sitter is properly set-up by the user, it can be
+enabled for files named "go.work".
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index e5c27de81fc..4dbb0906b9e 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -273,7 +273,7 @@ automatically)."
     (elm-mode . ("elm-language-server"))
     (mint-mode . ("mint" "ls"))
     ((kotlin-mode kotlin-ts-mode) . ("kotlin-language-server"))
-    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode)
+    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode go-work-ts-mode)
      . ("gopls"))
     ((R-mode ess-r-mode) . ("R" "--slave" "-e"
                             "languageserver::run()"))
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 86e74ad58a8..8ab54a71f1b 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -24,6 +24,9 @@
 
 ;;; Commentary:
 ;;
+;; - Go grammar: https://github.com/tree-sitter/tree-sitter-go
+;; - Go module grammar: https://github.com/camdencheek/tree-sitter-go-mod
+;; - Go workspace grammar: https://github.com/omertuc/tree-sitter-go-work
 
 ;;; Code:
 
@@ -483,7 +486,7 @@ be run."
   "Tree-sitter indent rules for `go-mod-ts-mode'.")
 
 (defun go-mod-ts-mode--in-directive-p ()
-  "Return non-nil if point is inside a directive.
+  "Return non-nil if point is inside a Go module directive.
 When entering an empty directive or adding a new entry to one, no node
 will be present meaning none of the indentation rules will match,
 because there is no parent to match against.  This function determines
@@ -565,6 +568,102 @@ what the parent of the node would be if it were a node."
 (if (treesit-ready-p 'gomod)
     (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
 
+;; go.work support.
+
+(defvar go-work-ts-mode--syntax-table
+  (let ((table (make-syntax-table)))
+    (modify-syntax-entry ?/   ". 124b" table)
+    (modify-syntax-entry ?\n  "> b"    table)
+    table)
+  "Syntax table for `go-work-ts-mode'.")
+
+(defvar go-work-ts-mode--indent-rules
+  `((gowork
+     ((node-is ")") parent-bol 0)
+     ((parent-is "replace_directive") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "use_directive") parent-bol go-ts-mode-indent-offset)
+     ((go-work-ts-mode--in-directive-p) no-indent go-ts-mode-indent-offset)
+     (no-node no-indent 0)))
+  "Tree-sitter indent rules for `go-work-ts-mode'.")
+
+(defun go-work-ts-mode--in-directive-p ()
+  "Return non-nil if point is inside a Go workspace directive.
+When entering an empty directive or adding a new entry to one, no node
+will be present meaning none of the indentation rules will match,
+because there is no parent to match against.  This function determines
+what the parent of the node would be if it were a node."
+  (lambda (node _ _ &rest _)
+    (unless (treesit-node-type node)
+      (save-excursion
+        (backward-up-list)
+        (back-to-indentation)
+        (pcase (treesit-node-type (treesit-node-at (point)))
+          ("replace" t)
+          ("use" t))))))
+
+(defvar go-work-ts-mode--keywords
+  '("go" "replace" "use")
+  "go.work keywords for tree-sitter font-locking.")
+
+(defvar go-work-ts-mode--font-lock-settings
+  (treesit-font-lock-rules
+   :language 'gowork
+   :feature 'bracket
+   '((["(" ")"]) @font-lock-bracket-face)
+
+   :language 'gowork
+   :feature 'comment
+   '((comment) @font-lock-comment-face)
+
+   :language 'gowork
+   :feature 'keyword
+   `([,@go-work-ts-mode--keywords] @font-lock-keyword-face)
+
+   :language 'gowork
+   :feature 'number
+   '([(go_version) (version)] @font-lock-number-face)
+
+   :language 'gowork
+   :feature 'operator
+   '((["=>"]) @font-lock-operator-face)
+
+   :language 'gowork
+   :feature 'error
+   :override t
+   '((ERROR) @font-lock-warning-face))
+  "Tree-sitter font-lock settings for `go-work-ts-mode'.")
+
+;;;###autoload
+(define-derived-mode go-work-ts-mode prog-mode "Go Work"
+  "Major mode for editing go.work files, powered by tree-sitter."
+  :group 'go
+  :syntax-table go-work-ts-mode--syntax-table
+
+  (when (treesit-ready-p 'gowork)
+    (setq treesit-primary-parser (treesit-parser-create 'gowork))
+
+    ;; Comments.
+    (setq-local comment-start "// ")
+    (setq-local comment-end "")
+    (setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
+
+    ;; Indent.
+    (setq-local indent-tabs-mode t
+                treesit-simple-indent-rules go-work-ts-mode--indent-rules)
+
+    ;; Font-lock.
+    (setq-local treesit-font-lock-settings go-work-ts-mode--font-lock-settings)
+    (setq-local treesit-font-lock-feature-list
+                '((comment)
+                  (keyword)
+                  (number)
+                  (bracket error operator)))
+
+    (treesit-major-mode-setup)))
+
+(if (treesit-ready-p 'gowork)
+    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))
+
 (provide 'go-ts-mode)
 
 ;;; go-ts-mode.el ends here
diff --git a/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go b/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
new file mode 100644
index 00000000000..7bee6848810
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
@@ -0,0 +1,4 @@
+replace gnu.org/go/package1 v1.0.0 => gnu.org/go/package2 v1.0.0
+// ^ font-lock-keyword-face
+//                             ^ font-lock-number-face
+//                                 ^ font-lock-operator-face
diff --git a/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts b/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
new file mode 100644
index 00000000000..2f7bfd9030b
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
@@ -0,0 +1,16 @@
+Code:
+  (lambda ()
+    (go-mod-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Point-Char: |
+
+Name: Basic
+
+=-=
+require (
+	gnu.org/go/package1 v1.0.0
+	gnu.org/go/package2 v1.0.0
+)
+
+=-=-=
diff --git a/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts b/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts
new file mode 100644
index 00000000000..b210974cedc
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts
@@ -0,0 +1,16 @@
+Code:
+  (lambda ()
+    (go-work-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Point-Char: |
+
+Name: Basic
+
+=-=
+use (
+	./package1
+	./package2
+)
+
+=-=-=
diff --git a/test/lisp/progmodes/go-ts-mode-tests.el b/test/lisp/progmodes/go-ts-mode-tests.el
index f36dbde5103..154c424064c 100644
--- a/test/lisp/progmodes/go-ts-mode-tests.el
+++ b/test/lisp/progmodes/go-ts-mode-tests.el
@@ -23,6 +23,8 @@
 (require 'ert-x)
 (require 'treesit)
 
+;; go-ts-mode
+
 (ert-deftest go-ts-mode-test-indentation ()
   (skip-unless (treesit-ready-p 'go))
   (ert-test-erts-file (ert-resource-file "indent.erts")))
@@ -32,6 +34,27 @@
   (let ((treesit-font-lock-level 4))
     (ert-font-lock-test-file (ert-resource-file "font-lock.go") 'go-ts-mode)))
 
+;; go-mod-ts-mode
+
+(ert-deftest go-work-ts-mode-test-indentation ()
+  (skip-unless (treesit-ready-p 'gomod))
+  (ert-test-erts-file (ert-resource-file "indent-mod.erts")))
+
+(ert-deftest go-mod-ts-test-font-lock ()
+  (skip-unless (treesit-ready-p 'gomod))
+  (let ((treesit-font-lock-level 4))
+    (ert-font-lock-test-file (ert-resource-file "font-lock-package.go") 'go-mod-ts-mode)))
+
+;; go-work-ts-mode
+
+(ert-deftest go-work-ts-mode-test-indentation ()
+  (skip-unless (treesit-ready-p 'gowork))
+  (ert-test-erts-file (ert-resource-file "indent-work.erts")))
+
+(ert-deftest go-work-ts-test-font-lock ()
+  (skip-unless (treesit-ready-p 'gowork))
+  (let ((treesit-font-lock-level 4))
+    (ert-font-lock-test-file (ert-resource-file "font-lock-package.go") 'go-work-ts-mode)))
+
 (provide 'go-ts-mode-tests)
 ;;; go-ts-mode-tests.el ends here
--
2.47.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 30 Nov 2024 10:18:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 30 05:18:05 2024
Received: from localhost ([127.0.0.1]:45555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tHKY8-00082q-MV
	for submit <at> debbugs.gnu.org; Sat, 30 Nov 2024 05:18:05 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38886)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tHKY4-000826-TY
 for 74461 <at> debbugs.gnu.org; Sat, 30 Nov 2024 05:18:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tHKXw-0007a2-DI; Sat, 30 Nov 2024 05:17:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=McwNqBYJEjQHM7beKiK8gAa0RY5tHQK1WsWvgu0sjI8=; b=oPrCYinz8dQz
 6RrQCNXCjrpMPDngfvZB2GTQ+kIIBibe0ygbatx84SHZQ5zcf0ntbZ3zmKF0s48Mr8jOjKqVA21r4
 yE1rAkfZ9LEWCAgibfjki1i/bruwJom6XCLBva9PNarSuuSJJk//okRf5PW5/Q2BBSqPWvjKLMTIy
 VMP74v4uZUGnxQCkerLgrS/+Bo/kQ/ix57pwfxQ1NyClxf5swCk+aorDHwGXNE5QbZ8g5AB6E1qse
 AtmsCSJtfqsYqahQF0AAoLTuTgnL61fLdOsdG80oOicc19OiKqnMW4yNiVh6qFRuaOlWT0Y9OnDQB
 sOK5T5NjDdkJ/7/lManlmQ==;
Date: Sat, 30 Nov 2024 12:17:45 +0200
Message-Id: <86jzcl81py.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
In-Reply-To: <87ttbzd16p.fsf@HIDDEN> (message from Gabriel Santos on Fri, 
 22 Nov 2024 07:15:26 -0300)
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
References: <87ttbzd16p.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74461
Cc: dev@HIDDEN, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
> Cc: 74461 <at> debbugs.gnu.org, eliz@HIDDEN
> Date: Fri, 22 Nov 2024 07:15:26 -0300
> 
> I fixed the mistake you pointed out in build.sh
> 
> > It would be nice to have syntax highlighting and indentation tests for
> > this (ideally covering everything). If you're interested, take a look
> > at go-ts-mode-tests.el and the files it references for inspiration.
> 
> I wrote some simple tests for both go-mod-ts-mode and go-work-ts-mode.
> For syntax highlighting, I had them both use the same file
> (font-lock-package.go), since they have some compatible elements, and
> for indentation, I made a simple test for indenting multiple lines.
> 
> I also changed the face for operators (on go-work-ts-mode), as I
> incorrectly used font-lock-warning-face.
> 
> Also, please let me know your opinion on how I layed out the grammars in
> the commentary section. I think I'll go through the other tree-sitter
> modes and add the grammar to their commentary section too, so it's nice
> to get some feedback before making these changes.

The patch LGTM, but if you have a later version, please post that.

The only comment I have is that for the commit log message:

> * lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
> workspace files.
> * lisp/progmodes/go-ts-mode: Add the repositories for the grammars to
> the commentary section.
> * lisp/progmodes/go-ts-mode (go-mod-ts-mode--in-directive-p): Be more
> specific on the directive location.

These should mention the file name only once, and they all should
mention the names of functions/variables where the changes were made.
For new functions, just list them and say "New functions."

Also, the lines in the log message are too long: they should
preferably be at most 64 columns, and never more than 70.

How is your copyright assignment paperwork going?  I don't think I saw
any responses from the FSF copyright clerk; if more than 2 weeks have
passed since you emailed the assignment form, please ping them and CC
me.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Nov 2024 10:15:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 22 05:15:42 2024
Received: from localhost ([127.0.0.1]:53121 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEQhR-0001kB-S0
	for submit <at> debbugs.gnu.org; Fri, 22 Nov 2024 05:15:42 -0500
Received: from layka.disroot.org ([178.21.23.139]:45988)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tEQhO-0001jz-5g
 for 74461 <at> debbugs.gnu.org; Fri, 22 Nov 2024 05:15:39 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id B474B25259;
 Fri, 22 Nov 2024 11:15:36 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id f7EYUlImuXLO; Fri, 22 Nov 2024 11:15:31 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1732270531; bh=2Ve3TfX06X4x9iq/JHJIhnZ8lyx8I0rq/McIwPFRU1E=;
 h=From:To:Cc:Subject:Date;
 b=Rk2/+OsIL2QPiD1irw4a3Bmz8u0dVvc272NEWLcjlqnB6aes2QJ7vJFVq3xVffLRh
 zQbqZwXF7mFdE4Vl4L1gdksaJHSva000D5fF/CGc05/QQI/ITexlhd/8mbY8awV1hA
 WNwmNjohsNn28zz/6V9HwQ+tjjEIhCzvjRKAAgHk8mwJ30WyJ/N9sGS95pp3zOVJQe
 Wm1xVVUlZ57P3GBhxjjg9rCPqpQ2jh0iAShAP8SRdeTqGYWFb752uPr0GmkTQ/1E5X
 Gz7zAOY6UJ/Vza+ZyKLawd/iAPcREGYxsgCFOc3PZICDCUIUF9C4ljvztaFeI4EtDl
 uU7y7jZJn2vIA==
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: dev@HIDDEN
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Date: Fri, 22 Nov 2024 07:15:26 -0300
Message-ID: <87ttbzd16p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: eliz@HIDDEN, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

I fixed the mistake you pointed out in build.sh

> It would be nice to have syntax highlighting and indentation tests for
> this (ideally covering everything). If you're interested, take a look
> at go-ts-mode-tests.el and the files it references for inspiration.

I wrote some simple tests for both go-mod-ts-mode and go-work-ts-mode.
For syntax highlighting, I had them both use the same file
(font-lock-package.go), since they have some compatible elements, and
for indentation, I made a simple test for indenting multiple lines.

I also changed the face for operators (on go-work-ts-mode), as I
incorrectly used font-lock-warning-face.

Also, please let me know your opinion on how I layed out the grammars in
the commentary section. I think I'll go through the other tree-sitter
modes and add the grammar to their commentary section too, so it's nice
to get some feedback before making these changes.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0001-Add-go-work-ts-mode.patch
Content-Description: [PATCH] Add go-work-ts-mode

From eb704432594e0ce5114184fe87152122c2b69595 Mon Sep 17 00:00:00 2001
From: Gabriel <gabrielsantosdesouza@HIDDEN>
Date: Wed, 20 Nov 2024 23:07:28 -0300
Subject: [PATCH] Add go-work-ts-mode

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
* etc/NEWS: Mention go-work-ts-mode.
* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
workspace files.
* lisp/progmodes/go-ts-mode: Add the repositories for the grammars to
the commentary section.
* lisp/progmodes/go-ts-mode (go-mod-ts-mode--in-directive-p): Be more
specific on the directive location.
* test/lisp/progmodes/go-ts-mode-tests: Add tests for Go module and
workspace files.
* test/lisp/progmodes/go-ts-mode-resources/font-lock-package: New file
for both go-mod-ts-mode and go-work-ts-mode font-locking tests.
* test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts:
* test/lisp/progmodes/go-ts-mode-resources/indent-work.erts: New files
for testing indentation in Go module and workspace files.
---
 admin/notes/tree-sitter/build-module/batch.sh |   1 +
 admin/notes/tree-sitter/build-module/build.sh |   5 +
 etc/NEWS                                      |   6 ++
 lisp/progmodes/eglot.el                       |   2 +-
 lisp/progmodes/go-ts-mode.el                  | 101 +++++++++++++++++-
 .../go-ts-mode-resources/font-lock-package.go |   4 +
 .../go-ts-mode-resources/indent-mod.erts      |  16 +++
 .../go-ts-mode-resources/indent-work.erts     |  16 +++
 test/lisp/progmodes/go-ts-mode-tests.el       |  24 +++++
 9 files changed, 173 insertions(+), 2 deletions(-)
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
 create mode 100644 test/lisp/progmodes/go-ts-mode-resources/indent-work.erts

diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh
index 012b5882e83..1b5214267f5 100755
--- a/admin/notes/tree-sitter/build-module/batch.sh
+++ b/admin/notes/tree-sitter/build-module/batch.sh
@@ -11,6 +11,7 @@ languages=(
     'elixir'
     'go'
     'go-mod'
+    'go-work'
     'heex'
     'html'
     'java'
diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index 9a567bb094d..4f3c6da3c5f 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -39,6 +39,11 @@ case "${lang}" in
         lang="gomod"
         org="camdencheek"
         ;;
+    "go-work")
+        # The parser is called "gowork".
+        lang="gowork"
+        org="omertuc"
+        ;;
     "heex")
         org="phoenixframework"
         ;;
diff --git a/etc/NEWS b/etc/NEWS
index b6c21018779..a07d9300fe9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -925,6 +925,12 @@ current buffer, if the major mode supports it.  (Support for
 Transformed images are smoothed using the bilinear interpolation by
 means of the GDI+ library.
 
+---
+** New major mode 'go-work-ts-mode'.
+A major mode based on the tree-sitter library for editing "go.work"
+files.  If tree-sitter is properly set-up by the user, it can be
+enabled for files named "go.work".
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index e5c27de81fc..4dbb0906b9e 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -273,7 +273,7 @@ automatically)."
     (elm-mode . ("elm-language-server"))
     (mint-mode . ("mint" "ls"))
     ((kotlin-mode kotlin-ts-mode) . ("kotlin-language-server"))
-    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode)
+    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode go-work-ts-mode)
      . ("gopls"))
     ((R-mode ess-r-mode) . ("R" "--slave" "-e"
                             "languageserver::run()"))
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 86e74ad58a8..8ab54a71f1b 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -24,6 +24,9 @@
 
 ;;; Commentary:
 ;;
+;; - Go grammar: https://github.com/tree-sitter/tree-sitter-go
+;; - Go module grammar: https://github.com/camdencheek/tree-sitter-go-mod
+;; - Go workspace grammar: https://github.com/omertuc/tree-sitter-go-work
 
 ;;; Code:
 
@@ -483,7 +486,7 @@ be run."
   "Tree-sitter indent rules for `go-mod-ts-mode'.")
 
 (defun go-mod-ts-mode--in-directive-p ()
-  "Return non-nil if point is inside a directive.
+  "Return non-nil if point is inside a Go module directive.
 When entering an empty directive or adding a new entry to one, no node
 will be present meaning none of the indentation rules will match,
 because there is no parent to match against.  This function determines
@@ -565,6 +568,102 @@ what the parent of the node would be if it were a node."
 (if (treesit-ready-p 'gomod)
     (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
 
+;; go.work support.
+
+(defvar go-work-ts-mode--syntax-table
+  (let ((table (make-syntax-table)))
+    (modify-syntax-entry ?/   ". 124b" table)
+    (modify-syntax-entry ?\n  "> b"    table)
+    table)
+  "Syntax table for `go-work-ts-mode'.")
+
+(defvar go-work-ts-mode--indent-rules
+  `((gowork
+     ((node-is ")") parent-bol 0)
+     ((parent-is "replace_directive") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "use_directive") parent-bol go-ts-mode-indent-offset)
+     ((go-work-ts-mode--in-directive-p) no-indent go-ts-mode-indent-offset)
+     (no-node no-indent 0)))
+  "Tree-sitter indent rules for `go-work-ts-mode'.")
+
+(defun go-work-ts-mode--in-directive-p ()
+  "Return non-nil if point is inside a Go workspace directive.
+When entering an empty directive or adding a new entry to one, no node
+will be present meaning none of the indentation rules will match,
+because there is no parent to match against.  This function determines
+what the parent of the node would be if it were a node."
+  (lambda (node _ _ &rest _)
+    (unless (treesit-node-type node)
+      (save-excursion
+        (backward-up-list)
+        (back-to-indentation)
+        (pcase (treesit-node-type (treesit-node-at (point)))
+          ("replace" t)
+          ("use" t))))))
+
+(defvar go-work-ts-mode--keywords
+  '("go" "replace" "use")
+  "go.work keywords for tree-sitter font-locking.")
+
+(defvar go-work-ts-mode--font-lock-settings
+  (treesit-font-lock-rules
+   :language 'gowork
+   :feature 'bracket
+   '((["(" ")"]) @font-lock-bracket-face)
+
+   :language 'gowork
+   :feature 'comment
+   '((comment) @font-lock-comment-face)
+
+   :language 'gowork
+   :feature 'keyword
+   `([,@go-work-ts-mode--keywords] @font-lock-keyword-face)
+
+   :language 'gowork
+   :feature 'number
+   '([(go_version) (version)] @font-lock-number-face)
+
+   :language 'gowork
+   :feature 'operator
+   '((["=>"]) @font-lock-operator-face)
+
+   :language 'gowork
+   :feature 'error
+   :override t
+   '((ERROR) @font-lock-warning-face))
+  "Tree-sitter font-lock settings for `go-work-ts-mode'.")
+
+;;;###autoload
+(define-derived-mode go-work-ts-mode prog-mode "Go Work"
+  "Major mode for editing go.work files, powered by tree-sitter."
+  :group 'go
+  :syntax-table go-work-ts-mode--syntax-table
+
+  (when (treesit-ready-p 'gowork)
+    (setq treesit-primary-parser (treesit-parser-create 'gowork))
+
+    ;; Comments.
+    (setq-local comment-start "// ")
+    (setq-local comment-end "")
+    (setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
+
+    ;; Indent.
+    (setq-local indent-tabs-mode t
+                treesit-simple-indent-rules go-work-ts-mode--indent-rules)
+
+    ;; Font-lock.
+    (setq-local treesit-font-lock-settings go-work-ts-mode--font-lock-settings)
+    (setq-local treesit-font-lock-feature-list
+                '((comment)
+                  (keyword)
+                  (number)
+                  (bracket error operator)))
+
+    (treesit-major-mode-setup)))
+
+(if (treesit-ready-p 'gowork)
+    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))
+
 (provide 'go-ts-mode)
 
 ;;; go-ts-mode.el ends here
diff --git a/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go b/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
new file mode 100644
index 00000000000..7bee6848810
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go
@@ -0,0 +1,4 @@
+replace gnu.org/go/package1 v1.0.0 => gnu.org/go/package2 v1.0.0
+// ^ font-lock-keyword-face
+//                             ^ font-lock-number-face
+//                                 ^ font-lock-operator-face
diff --git a/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts b/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
new file mode 100644
index 00000000000..2f7bfd9030b
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts
@@ -0,0 +1,16 @@
+Code:
+  (lambda ()
+    (go-mod-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Point-Char: |
+
+Name: Basic
+
+=-=
+require (
+	gnu.org/go/package1 v1.0.0
+	gnu.org/go/package2 v1.0.0
+)
+
+=-=-=
diff --git a/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts b/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts
new file mode 100644
index 00000000000..b210974cedc
--- /dev/null
+++ b/test/lisp/progmodes/go-ts-mode-resources/indent-work.erts
@@ -0,0 +1,16 @@
+Code:
+  (lambda ()
+    (go-work-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Point-Char: |
+
+Name: Basic
+
+=-=
+use (
+	./package1
+	./package2
+)
+
+=-=-=
diff --git a/test/lisp/progmodes/go-ts-mode-tests.el b/test/lisp/progmodes/go-ts-mode-tests.el
index f36dbde5103..154c424064c 100644
--- a/test/lisp/progmodes/go-ts-mode-tests.el
+++ b/test/lisp/progmodes/go-ts-mode-tests.el
@@ -23,6 +23,8 @@
 (require 'ert-x)
 (require 'treesit)
 
+;; go-ts-mode
+
 (ert-deftest go-ts-mode-test-indentation ()
   (skip-unless (treesit-ready-p 'go))
   (ert-test-erts-file (ert-resource-file "indent.erts")))
@@ -32,5 +34,27 @@
   (let ((treesit-font-lock-level 4))
     (ert-font-lock-test-file (ert-resource-file "font-lock.go") 'go-ts-mode)))
 
+;; go-mod-ts-mode
+
+(ert-deftest go-work-ts-mode-test-indentation ()
+  (skip-unless (treesit-ready-p 'gomod))
+  (ert-test-erts-file (ert-resource-file "indent-mod.erts")))
+
+(ert-deftest go-mod-ts-test-font-lock ()
+  (skip-unless (treesit-ready-p 'gomod))
+  (let ((treesit-font-lock-level 4))
+    (ert-font-lock-test-file (ert-resource-file "font-lock-package.go") 'go-mod-ts-mode)))
+
+;; go-work-ts-mode
+
+(ert-deftest go-work-ts-mode-test-indentation ()
+  (skip-unless (treesit-ready-p 'gowork))
+  (ert-test-erts-file (ert-resource-file "indent-work.erts")))
+
+(ert-deftest go-work-ts-test-font-lock ()
+  (skip-unless (treesit-ready-p 'gowork))
+  (let ((treesit-font-lock-level 4))
+    (ert-font-lock-test-file (ert-resource-file "font-lock-package.go") 'go-work-ts-mode)))
+
 (provide 'go-ts-mode-tests)
 ;;; go-ts-mode-tests.el ends here
-- 
2.47.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Nov 2024 03:56:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 22:56:40 2024
Received: from localhost ([127.0.0.1]:52584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEKmd-0000uM-9Q
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 22:56:40 -0500
Received: from layka.disroot.org ([178.21.23.139]:51976)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tEHJ2-0007D4-Vt
 for 74461 <at> debbugs.gnu.org; Thu, 21 Nov 2024 19:13:55 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id A87BC24DC4;
 Fri, 22 Nov 2024 01:13:51 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id rV98yvSPhnDk; Fri, 22 Nov 2024 01:13:47 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1732234427; bh=PmbAhhgYVfqnYdeCGG29zZ2Mh1ebzknj//sxm1ii2mc=;
 h=From:To:Cc:Subject:Date;
 b=J7RvX5H+S6FUG+gUkPZOu3yM+VMwCrY0LmlQ2fI4qXkzr7W94Rcq7kHVmy3xCcZjU
 SABmXxJan6WJ+Om7gmeTH9bgr9/9K5rA8DkWHxlbyqUGmZwbWwWqK7s2zU1pHNWul2
 OK146bOdsjdMrlRLo6NfdGFKSxMBhszidUveRNapl62fj8fOfGg1kRxFd3iib/8V81
 isQd7rxH4dfiBeoEEs7epsVP/T8XdGYRZh8FuUwZNCSfWcblji2cRmkMrF1YBHnTRz
 xiAFN9PGqhT0JpSQNrG6RJrfNqrkr0PTtGotZeQrNHkmSnl3SBeAlf495cxpOGMPUu
 yLxCTkP6d00bg==
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: eliz@HIDDEN
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Date: Thu, 21 Nov 2024 21:13:42 -0300
Message-ID: <871pz4dt1l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
X-Mailman-Approved-At: Thu, 21 Nov 2024 22:56:36 -0500
Cc: 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

>[Please use Reply All to reply, to keep the bug tracker CC'ed.]

Thanks, got it. I didn't reply to all because the last e-mail was sent
from my phone. This one is from Emacs, and I added the following to the
header (before the e-mail body):

To: eliz@HIDDEN
Cc: 74461 <at> debbugs.gnu.org
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode

Let me know if I made any other mistakes in this e-mail.

>> Also, this is my first time on an e-mail workflow like this. Updating the patch based on your requests would
>> only require a rebase + new e-mail, or a rebase + reply to this thread?
>
>The latter.  Using the same thread keeps all the discussions recorded
>as part of the same issue number, which is good for future reviewing
>of the discussion.  For the same reason, please don't edit the Subject
>of the responses, so that they all keep the same Subject.
>
>Thanks.
>

Thanks, I used the current subject for this e-mail now.

Also, attached is the rebased commit featuring the changes you
requested. I also went ahead and clarified the documentation for
`go-mod-ts-mode--in-directive-p', to make it less generalized.

Through this contribution, I think I'll get more comfortable with the
e-mail workflow, and end up contributing more here. My next one would be
mentioning the parser URLs in the other tree-sitter modes. treesit-auto
(https://github.com/renzmann/treesit-auto) has a collection of them, so
this shouldn't be particularly difficult.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0001-Add-go-work-ts-mode.patch
Content-Description: [PATCH] Add go-work-ts-mode

From 41571fc2d5515f0ede893eba0cc1ce316ef575a2 Mon Sep 17 00:00:00 2001
From: Gabriel <gabrielsantosdesouza@HIDDEN>
Date: Wed, 20 Nov 2024 23:07:28 -0300
Subject: [PATCH] Add go-work-ts-mode

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
* etc/NEWS: Mention go-work-ts-mode.
* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
workspace files.
* lisp/progmodes/go-ts-mode: Add the repositories for the grammars to
the commentary section.
* lisp/progmodes/go-ts-mode (go-mod-ts-mode--in-directive-p): Be more
specific on the directive location.
---
 admin/notes/tree-sitter/build-module/batch.sh |   1 +
 admin/notes/tree-sitter/build-module/build.sh |   5 +
 etc/NEWS                                      |   6 ++
 lisp/progmodes/eglot.el                       |   2 +-
 lisp/progmodes/go-ts-mode.el                  | 101 +++++++++++++++++-
 5 files changed, 113 insertions(+), 2 deletions(-)

diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh
index 012b5882e83..1b5214267f5 100755
--- a/admin/notes/tree-sitter/build-module/batch.sh
+++ b/admin/notes/tree-sitter/build-module/batch.sh
@@ -11,6 +11,7 @@ languages=(
     'elixir'
     'go'
     'go-mod'
+    'go-work'
     'heex'
     'html'
     'java'
diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index 9a567bb094d..263de388b00 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -39,6 +39,11 @@ case "${lang}" in
         lang="gomod"
         org="camdencheek"
         ;;
+    "go-work")
+        # The parser is called "gowork".
+        lang="gomod"
+        org="omertuc"
+        ;;
     "heex")
         org="phoenixframework"
         ;;
diff --git a/etc/NEWS b/etc/NEWS
index b6c21018779..a07d9300fe9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -925,6 +925,12 @@ current buffer, if the major mode supports it.  (Support for
 Transformed images are smoothed using the bilinear interpolation by
 means of the GDI+ library.
 
+---
+** New major mode 'go-work-ts-mode'.
+A major mode based on the tree-sitter library for editing "go.work"
+files.  If tree-sitter is properly set-up by the user, it can be
+enabled for files named "go.work".
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index e5c27de81fc..4dbb0906b9e 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -273,7 +273,7 @@ automatically)."
     (elm-mode . ("elm-language-server"))
     (mint-mode . ("mint" "ls"))
     ((kotlin-mode kotlin-ts-mode) . ("kotlin-language-server"))
-    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode)
+    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode go-work-ts-mode)
      . ("gopls"))
     ((R-mode ess-r-mode) . ("R" "--slave" "-e"
                             "languageserver::run()"))
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 86e74ad58a8..288b543ae5c 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -24,6 +24,9 @@
 
 ;;; Commentary:
 ;;
+;; - Go grammar: https://github.com/tree-sitter/tree-sitter-go
+;; - Go module grammar: https://github.com/camdencheek/tree-sitter-go-mod
+;; - Go workspace grammar: https://github.com/omertuc/tree-sitter-go-work
 
 ;;; Code:
 
@@ -483,7 +486,7 @@ be run."
   "Tree-sitter indent rules for `go-mod-ts-mode'.")
 
 (defun go-mod-ts-mode--in-directive-p ()
-  "Return non-nil if point is inside a directive.
+  "Return non-nil if point is inside a Go module directive.
 When entering an empty directive or adding a new entry to one, no node
 will be present meaning none of the indentation rules will match,
 because there is no parent to match against.  This function determines
@@ -565,6 +568,102 @@ what the parent of the node would be if it were a node."
 (if (treesit-ready-p 'gomod)
     (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
 
+;; go.work support.
+
+(defvar go-work-ts-mode--syntax-table
+  (let ((table (make-syntax-table)))
+    (modify-syntax-entry ?/   ". 124b" table)
+    (modify-syntax-entry ?\n  "> b"    table)
+    table)
+  "Syntax table for `go-work-ts-mode'.")
+
+(defvar go-work-ts-mode--indent-rules
+  `((gowork
+     ((node-is ")") parent-bol 0)
+     ((parent-is "replace_directive") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "use_directive") parent-bol go-ts-mode-indent-offset)
+     ((go-work-ts-mode--in-directive-p) no-indent go-ts-mode-indent-offset)
+     (no-node no-indent 0)))
+  "Tree-sitter indent rules for `go-work-ts-mode'.")
+
+(defun go-work-ts-mode--in-directive-p ()
+  "Return non-nil if point is inside a Go workspace directive.
+When entering an empty directive or adding a new entry to one, no node
+will be present meaning none of the indentation rules will match,
+because there is no parent to match against.  This function determines
+what the parent of the node would be if it were a node."
+  (lambda (node _ _ &rest _)
+    (unless (treesit-node-type node)
+      (save-excursion
+        (backward-up-list)
+        (back-to-indentation)
+        (pcase (treesit-node-type (treesit-node-at (point)))
+          ("replace" t)
+          ("use" t))))))
+
+(defvar go-work-ts-mode--keywords
+  '("go" "replace" "use")
+  "go.work keywords for tree-sitter font-locking.")
+
+(defvar go-work-ts-mode--font-lock-settings
+  (treesit-font-lock-rules
+   :language 'gowork
+   :feature 'bracket
+   '((["(" ")"]) @font-lock-bracket-face)
+
+   :language 'gowork
+   :feature 'comment
+   '((comment) @font-lock-comment-face)
+
+   :language 'gowork
+   :feature 'keyword
+   `([,@go-work-ts-mode--keywords] @font-lock-keyword-face)
+
+   :language 'gowork
+   :feature 'number
+   '([(go_version) (version)] @font-lock-number-face)
+
+   :language 'gowork
+   :feature 'operator
+   '((["=>"]) @font-lock-warning-face)
+
+   :language 'gowork
+   :feature 'error
+   :override t
+   '((ERROR) @font-lock-warning-face))
+  "Tree-sitter font-lock settings for `go-work-ts-mode'.")
+
+;;;###autoload
+(define-derived-mode go-work-ts-mode prog-mode "Go Work"
+  "Major mode for editing go.work files, powered by tree-sitter."
+  :group 'go
+  :syntax-table go-work-ts-mode--syntax-table
+
+  (when (treesit-ready-p 'gowork)
+    (setq treesit-primary-parser (treesit-parser-create 'gowork))
+
+    ;; Comments.
+    (setq-local comment-start "// ")
+    (setq-local comment-end "")
+    (setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
+
+    ;; Indent.
+    (setq-local indent-tabs-mode t
+                treesit-simple-indent-rules go-work-ts-mode--indent-rules)
+
+    ;; Font-lock.
+    (setq-local treesit-font-lock-settings go-work-ts-mode--font-lock-settings)
+    (setq-local treesit-font-lock-feature-list
+                '((comment)
+                  (keyword)
+                  (number)
+                  (bracket error operator)))
+
+    (treesit-major-mode-setup)))
+
+(if (treesit-ready-p 'gowork)
+    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))
+
 (provide 'go-ts-mode)
 
 ;;; go-ts-mode.el ends here
-- 
2.47.0


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 22 Nov 2024 02:36:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 21:36:47 2024
Received: from localhost ([127.0.0.1]:52386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEJXK-0005SK-L3
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 21:36:47 -0500
Received: from mail-4022.proton.ch ([185.70.40.22]:19365)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dev@HIDDEN>) id 1tEJXI-0005S7-Vt
 for 74461 <at> debbugs.gnu.org; Thu, 21 Nov 2024 21:36:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rjt.dev;
 s=protonmail3; t=1732242998; x=1732502198;
 bh=aHDQ7gZYhWMYuBt8Z21BoZbZL0PFZrJOELaEce4TvBM=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;
 b=cNWW6AYsv4eZzzHqqlTUxj4W4GJ28kXzOMfIPaDLWpZvc8x4Fh6fxognz6iD6NhkE
 vKg7y7lAGUBvBsToOEuxwBk3tIYfx3D8CUpApNEIGEnFQEAIoBhoRc/xtBzNKU6yuA
 8NRH9TJsmPC8uqy+WrNP8GXEGTseFL71nDYurLG6i80vdh8tacIp2B6CZy+ILeP3zZ
 DZO404XhPNQm0n5uDOWFKwqDl2ijoEte/7Zh4EPo67DTG6U1r9Ra3NE/H5W4SX1gNz
 9Rmu4WZMVz6iu/XWYkRAIZ7b9EtaDoBPA+atSS7UMNdbC4iZJHSkJIzax1oIrLzEV8
 qIZltSzImcV8A==
Date: Fri, 22 Nov 2024 02:36:34 +0000
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
From: Randy Taylor <dev@HIDDEN>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Message-ID: <7g_lFfcT8qujFnYQf_CP_H5BcQoDJXILzCt6I5B928kotWbz7YH-RAKORmjif0cK8KXQdPbkAnRmAEm8VFxLqa15j_I4ANIPgCnOKShEIxA=@rjt.dev>
In-Reply-To: <877c8wvp34.fsf@HIDDEN>
References: <877c8wvp34.fsf@HIDDEN>
Feedback-ID: 44397038:user:proton
X-Pm-Message-ID: 07aa0371597fc19da788ba822b1bcef94ed0b4f3
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74461
Cc: Eli Zaretskii <eliz@HIDDEN>, 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thursday, November 21st, 2024 at 05:49, Gabriel Santos via "Bug reports =
for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN=
> wrote:
>
> Greetings,
>
> I wrote a tree-sitter mode after founding there wasn't one for Go
> Workspace files. I'd like to say thanks to Randy Taylor on his work to
> the Go tree-sitter mode, helped me a lot in this process.

Thanks for working on this.

>
> Commit message:
>
> * admin/notes/tree-sitter/build-module/batch.sh:
> * admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
> * etc/NEWS: Mention go-work-ts-mode.
> * lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
> * lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
> workspace files.
>
> The parser can be found here:
> https://github.com/omertuc/tree-sitter-go-work
>
> And I tested changes locally with a package:
> https://github.com/gs-101/go-work-ts-mode
>
> Issues that could be found:
>
> - Some syntax highlighting might be unecessary (ERROR face)

Users can disable this if they desire.

> - The grammar might be outdated (I found no issues when testing)
> - Eglot addition might be unecessary

I think it's fine.

> - Grammar elements could be missing (I checked both grammar.js and
> - grammar.json, and only found the keywords added here)
>
> I will mail my copyright assignment to the FSF still today.
>
> Regards,
>
> -- Gabriel Santos

+    "go-work")
+        # The parser is called "gowork".
+        lang=3D"gomod"
Copy paste error ("gowork" instead)?

It would be nice to have syntax highlighting and indentation tests for
this (ideally covering everything). If you're interested, take a look
at go-ts-mode-tests.el and the files it references for inspiration.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 21 Nov 2024 19:14:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 14:14:33 2024
Received: from localhost ([127.0.0.1]:51739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tECdM-00025C-Uk
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:14:33 -0500
Received: from eggs.gnu.org ([209.51.188.92]:44534)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tECdK-00024t-Ic
 for 74461 <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:14:31 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tECdE-0001Oe-KF; Thu, 21 Nov 2024 14:14:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=7R5jWkvo63tCIS8azpEKvWirdB5rDi4ovZC3pTq0e/4=; b=gUsKce1TuqcB
 T43WKXGpnXdqY8mXxXg9Yem8E5O1NfpqIl7nKVGe2mFRVAO3oBbgfXgVPSpvYMvhWjvj7ieIj9aoH
 zA15rXg71U0B31XnnT+2dNgGFLWrNRA/jrbRV+gUQPFYXFp8q+hVDkGFzNugq2GOrH3cjtX7NI7s4
 nso+a2x6t12jYBfAZj8/Yx04foKmLUUj4lSwiVLPoBWVAnrfitoBHv6IA2pbw6YtyPGXTqV0jgJdm
 21b3bze26R92z4s/IgEDPqBI0DCtE1c30IYtoz/qKw0qjrNnMpFu3W04euRGnJNx5TTgI5gCmwLOg
 H4H/CMPFXdmz6u/1V9tVlg==;
Date: Thu, 21 Nov 2024 21:14:21 +0200
Message-Id: <865xogpfg2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
In-Reply-To: <F23F09F1-D3C4-4133-AC46-67E7E1C35BDA@HIDDEN> (message from
 Gabriel Santos on Thu, 21 Nov 2024 14:25:14 -0300)
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
References: <877c8wvp34.fsf@HIDDEN> <86a5dspob9.fsf@HIDDEN>
 <F23F09F1-D3C4-4133-AC46-67E7E1C35BDA@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74461
Cc: 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[Please use Reply All to reply, to keep the bug tracker CC'ed.]

> Date: Thu, 21 Nov 2024 14:25:14 -0300
> From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
> 
> >> Date: Thu, 21 Nov 2024 07:49:35 -0300
> >> From: Gabriel Santos via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> >> 
> >> I wrote a tree-sitter mode after founding there wasn't one for Go
> >> Workspace files. I'd like to say thanks to Randy Taylor on his work to
> >> the Go tree-sitter mode, helped me a lot in this process.
> >> 
> >> Commit message:
> >> 
> >> * admin/notes/tree-sitter/build-module/batch.sh:
> >> * admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
> >> * etc/NEWS: Mention go-work-ts-mode.
> >> * lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
> >> * lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
> >> workspace files.
> >> 
> >> The parser can be found here:
> >> https://github.com/omertuc/tree-sitter-go-work
> >
> >I think the parser URL should be mentioned in the comments in
> >go-ts-mode.el.
> 
> Thanks, got it. I'll also add the links to the other parsers too. This is helpful information for users, as some of
> these aren't included in the tree-sitter organization (https://github.com/tree-sitter).
> 
> >> I will mail my copyright assignment to the FSF still today.
> >
> >Thanks.
> 
> On this, I missed the address of my house by a single number (astonishing how often I do this). To update
> the data in my request, can I just send another e-mail?

Yes, sure.

> >> +---
> >> +** New major mode 'go-work-ts-mode'.
> >> +A major mode based on the tree-sitter library for editing "go.work"
> >> +files. It is auto-enabled for files which are named "go.work".
> >
> >The last sentence is factually inaccurate: the user needs to load
> >go-ts-mode to have this mode auto-enabled, right?
> 
> I got it from the original commit for the Go tree-sitter mode (fee2efe1b03 by Randy Taylor). I was working
> quite late at night on this, so I didn't have time to reflect. You're right, this mode won't be auto-loaded since
> tree-sitter modes currently require some user set-up to get working.
> 
> >> +(defun go-work-ts-mode--in-directive-p ()
> >> + "Return non-nil if point is inside a directive.
> >
> >"inside a go-work directive", I presume? IOW, the doc string's first
> >sentence sounds too general.
> 
> Again, I took this from the original commit. I'm currently viewing the new version of the
> `go-mod-ts-mode--in-directive-p' and the docstring is better written. I'll rewrite based on it, and also make
> sure to check the current state of files instead.
> 
> >> +(if (treesit-ready-p 'gowork)
> >> + (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))
> >
> >Wouldn't it be better to have this in the default value of
> >auto-mode-alist, just conditioned by (treesit-ready-p 'gowork) ? That
> >way, loading go-ts-mode will not change auto-mode-alist.
> >
> >Stefan, WDYT?
> 
> This change was also included in the file already, so I followed it. Looking at the current values of
> auto-mode-alist (lisp/files.el), I don't see any tree-sitter modes here. And other tree-sitter modes (see
> list/progmodes/rust-ts-mode) also include the same behaviour. I don't have much knowledge on this matter,
> so I'll let you decide on this.

Tree-sitter modes are not listed where we have other modes for the
same files, to avoid breaking past behavior.  I don't think this
danger is relevant to go.work files, but let's see what Stefan thinks
about that.

> Also, this is my first time on an e-mail workflow like this. Updating the patch based on your requests would
> only require a rebase + new e-mail, or a rebase + reply to this thread?

The latter.  Using the same thread keeps all the discussions recorded
as part of the same issue number, which is good for future reviewing
of the discussion.  For the same reason, please don't edit the Subject
of the responses, so that they all keep the same Subject.

Thanks.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at 74461 <at> debbugs.gnu.org:


Received: (at 74461) by debbugs.gnu.org; 21 Nov 2024 16:03:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:03:00 2024
Received: from localhost ([127.0.0.1]:51423 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tE9e0-0001dw-B2
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 11:03:00 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33514)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tE9dy-0001dg-T0
 for 74461 <at> debbugs.gnu.org; Thu, 21 Nov 2024 11:02:59 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tE9ds-0005w6-PM; Thu, 21 Nov 2024 11:02:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=SxKDYQlwgo6amBIBky9qu5PLOJH41CM2aPnSeulfqsU=; b=YsYWjUVTaYub
 ZrX5bvHB7XrOyVuwfOty5BNduJhXOx6uyWE+uTByeGrbzid6H9xq1DJmajA15MCliN1voULOeer2R
 +YDkIb7XNghQpz/3n5k4HcuDhR5C+xuxbMSkMi5e6DwC0dbiRMMzd/3xgkFqiCfOKyPYnS+iUceax
 +OR6GNxiRkgr4RVDWndkpWwYH/TbubHIVov++vJTN1Ecq58OnOEqg7F2mwot2ACA1ErjjtX2poCDg
 qOuGKBnbfy0gMxQW9aKZ8twW4uOHUGxhpubJhYS6pDKd7qsv3TdRlJcVIuD/2BmSPS3Nj8kpsFByi
 L9mKEFuA0T9ihiDsNjyxng==;
Date: Thu, 21 Nov 2024 18:02:50 +0200
Message-Id: <86a5dspob9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <877c8wvp34.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
References: <877c8wvp34.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74461
Cc: 74461 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 21 Nov 2024 07:49:35 -0300
> From:  Gabriel Santos via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> I wrote a tree-sitter mode after founding there wasn't one for Go
> Workspace files. I'd like to say thanks to Randy Taylor on his work to
> the Go tree-sitter mode, helped me a lot in this process.
> 
> Commit message:
> 
> * admin/notes/tree-sitter/build-module/batch.sh:
> * admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
> * etc/NEWS: Mention go-work-ts-mode.
> * lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
> * lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
> workspace files.
> 
> The parser can be found here:
> https://github.com/omertuc/tree-sitter-go-work

I think the parser URL should be mentioned in the comments in
go-ts-mode.el.

> I will mail my copyright assignment to the FSF still today.

Thanks.

> +---
> +** New major mode 'go-work-ts-mode'.
> +A major mode based on the tree-sitter library for editing "go.work"
> +files.  It is auto-enabled for files which are named "go.work".

The last sentence is factually inaccurate: the user needs to load
go-ts-mode to have this mode auto-enabled, right?

> +(defun go-work-ts-mode--in-directive-p ()
> +  "Return non-nil if point is inside a directive.

"inside a go-work directive", I presume?  IOW, the doc string's first
sentence sounds too general.

> +(if (treesit-ready-p 'gowork)
> +    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))

Wouldn't it be better to have this in the default value of
auto-mode-alist, just conditioned by (treesit-ready-p 'gowork) ?  That
way, loading go-ts-mode will not change auto-mode-alist.

Stefan, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2024 13:58:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 08:58:47 2024
Received: from localhost ([127.0.0.1]:49587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tE7hm-0003oa-1b
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 08:58:47 -0500
Received: from lists.gnu.org ([209.51.188.17]:36106)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tE4kv-0003eN-OT
 for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 05:49:50 -0500
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 <gabrielsantosdesouza@HIDDEN>)
 id 1tE4kv-0005Lt-8l
 for bug-gnu-emacs@HIDDEN; Thu, 21 Nov 2024 05:49:49 -0500
Received: from layka.disroot.org ([178.21.23.139])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1tE4ks-0006Yk-Nb
 for bug-gnu-emacs@HIDDEN; Thu, 21 Nov 2024 05:49:48 -0500
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 52D652529D
 for <bug-gnu-emacs@HIDDEN>; Thu, 21 Nov 2024 11:49:44 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id rvAAXjPc_IkF for <bug-gnu-emacs@HIDDEN>;
 Thu, 21 Nov 2024 11:49:40 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1732186179; bh=eZ7ASEBp7sIgx1mM5gg9GULrpby15/i7STmDRivGFeU=;
 h=From:To:Subject:Date;
 b=SBs6F9cnC91iANV4b9ZbPWnIXxqbosUj52Tdg4zhRedGtCWj8c9D7iZxvh1F4f/8F
 RF+o8ojqQ2OHSRFZUdEG+vtbPln9OISUs6FYzAzVxFI4DQNxy4Xh1ZwvckckD6zD5L
 0R1XstQT5Oww06phc6rn1HPoSRQLiPDdoxbXIOK+4qx1WpTmkWc2vdnsoUpcdTQWVK
 uRua+bmVyhIvoimIcnCYok2Mpl2huOwUkrTP1mSLjzIIjlrB7h8L2Cc2tG/hc8J5F1
 sSJQKs1EGlzIXK723QNTxduLhYmByud+klofHNzmoEqppwhWlxjZKdhx8h07KKu3fI
 Us2/AhqmFEr0A==
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Add go-work-ts-mode
Date: Thu, 21 Nov 2024 07:49:35 -0300
Message-ID: <877c8wvp34.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=178.21.23.139;
 envelope-from=gabrielsantosdesouza@HIDDEN; helo=layka.disroot.org
X-Spam_score_int: 0
X-Spam_score: -0.1
X-Spam_bar: /
X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 PDS_OTHER_BAD_TLD=1.999, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 21 Nov 2024 08:58:45 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
Content-Type: text/plain

Greetings,

I wrote a tree-sitter mode after founding there wasn't one for Go
Workspace files. I'd like to say thanks to Randy Taylor on his work to
the Go tree-sitter mode, helped me a lot in this process.

Commit message:

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
* etc/NEWS: Mention go-work-ts-mode.
* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
workspace files.

The parser can be found here:
https://github.com/omertuc/tree-sitter-go-work

And I tested changes locally with a package:
https://github.com/gs-101/go-work-ts-mode

Issues that could be found:

- Some syntax highlighting might be unecessary (ERROR face)
- The grammar might be outdated (I found no issues when testing)
- Eglot addition might be unecessary
- Grammar elements could be missing (I checked both grammar.js and
- grammar.json, and only found the keywords added here)

I will mail my copyright assignment to the FSF still today.

Regards,

-- Gabriel Santos


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=0001-Add-go-work-ts-mode.patch
Content-Description: [PATCH] Add go-work-ts-mode

From 3f05a09083411b8a849bf4ce8e622081873503c1 Mon Sep 17 00:00:00 2001
From: Gabriel <gabrielsantosdesouza@HIDDEN>
Date: Wed, 20 Nov 2024 23:07:28 -0300
Subject: [PATCH] Add go-work-ts-mode

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
* etc/NEWS: Mention go-work-ts-mode.
* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
workspace files.
---
 admin/notes/tree-sitter/build-module/batch.sh |  1 +
 admin/notes/tree-sitter/build-module/build.sh |  5 +
 etc/NEWS                                      |  5 +
 lisp/progmodes/eglot.el                       |  2 +-
 lisp/progmodes/go-ts-mode.el                  | 96 +++++++++++++++++++
 5 files changed, 108 insertions(+), 1 deletion(-)

diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh
index 012b5882e83..1b5214267f5 100755
--- a/admin/notes/tree-sitter/build-module/batch.sh
+++ b/admin/notes/tree-sitter/build-module/batch.sh
@@ -11,6 +11,7 @@ languages=(
     'elixir'
     'go'
     'go-mod'
+    'go-work'
     'heex'
     'html'
     'java'
diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index 9a567bb094d..263de388b00 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -39,6 +39,11 @@ case "${lang}" in
         lang="gomod"
         org="camdencheek"
         ;;
+    "go-work")
+        # The parser is called "gowork".
+        lang="gomod"
+        org="omertuc"
+        ;;
     "heex")
         org="phoenixframework"
         ;;
diff --git a/etc/NEWS b/etc/NEWS
index b6c21018779..e7f753fcda1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -925,6 +925,11 @@ current buffer, if the major mode supports it.  (Support for
 Transformed images are smoothed using the bilinear interpolation by
 means of the GDI+ library.
 
+---
+** New major mode 'go-work-ts-mode'.
+A major mode based on the tree-sitter library for editing "go.work"
+files.  It is auto-enabled for files which are named "go.work".
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index e5c27de81fc..4dbb0906b9e 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -273,7 +273,7 @@ automatically)."
     (elm-mode . ("elm-language-server"))
     (mint-mode . ("mint" "ls"))
     ((kotlin-mode kotlin-ts-mode) . ("kotlin-language-server"))
-    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode)
+    ((go-mode go-dot-mod-mode go-dot-work-mode go-ts-mode go-mod-ts-mode go-work-ts-mode)
      . ("gopls"))
     ((R-mode ess-r-mode) . ("R" "--slave" "-e"
                             "languageserver::run()"))
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 86e74ad58a8..605fa324e7a 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -565,6 +565,102 @@ what the parent of the node would be if it were a node."
 (if (treesit-ready-p 'gomod)
     (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
 
+;; go.work support.
+
+(defvar go-work-ts-mode--syntax-table
+  (let ((table (make-syntax-table)))
+    (modify-syntax-entry ?/   ". 124b" table)
+    (modify-syntax-entry ?\n  "> b"    table)
+    table)
+  "Syntax table for `go-work-ts-mode'.")
+
+(defvar go-work-ts-mode--indent-rules
+  `((gowork
+     ((node-is ")") parent-bol 0)
+     ((parent-is "replace_directive") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "use_directive") parent-bol go-ts-mode-indent-offset)
+     ((go-work-ts-mode--in-directive-p) no-indent go-ts-mode-indent-offset)
+     (no-node no-indent 0)))
+  "Tree-sitter indent rules for `go-work-ts-mode'.")
+
+(defun go-work-ts-mode--in-directive-p ()
+  "Return non-nil if point is inside a directive.
+When entering an empty directive or adding a new entry to one, no node
+will be present meaning none of the indentation rules will match,
+because there is no parent to match against.  This function determines
+what the parent of the node would be if it were a node."
+  (lambda (node _ _ &rest _)
+    (unless (treesit-node-type node)
+      (save-excursion
+        (backward-up-list)
+        (back-to-indentation)
+        (pcase (treesit-node-type (treesit-node-at (point)))
+          ("replace" t)
+          ("use" t))))))
+
+(defvar go-work-ts-mode--keywords
+  '("go" "replace" "use")
+  "go.work keywords for tree-sitter font-locking.")
+
+(defvar go-work-ts-mode--font-lock-settings
+  (treesit-font-lock-rules
+   :language 'gowork
+   :feature 'bracket
+   '((["(" ")"]) @font-lock-bracket-face)
+
+   :language 'gowork
+   :feature 'comment
+   '((comment) @font-lock-comment-face)
+
+   :language 'gowork
+   :feature 'keyword
+   `([,@go-work-ts-mode--keywords] @font-lock-keyword-face)
+
+   :language 'gowork
+   :feature 'number
+   '([(go_version) (version)] @font-lock-number-face)
+
+   :language 'gowork
+   :feature 'operator
+   '((["=>"]) @font-lock-warning-face)
+
+   :language 'gowork
+   :feature 'error
+   :override t
+   '((ERROR) @font-lock-warning-face))
+  "Tree-sitter font-lock settings for `go-work-ts-mode'.")
+
+;;;###autoload
+(define-derived-mode go-work-ts-mode prog-mode "Go Work"
+  "Major mode for editing go.work files, powered by tree-sitter."
+  :group 'go
+  :syntax-table go-work-ts-mode--syntax-table
+
+  (when (treesit-ready-p 'gowork)
+    (setq treesit-primary-parser (treesit-parser-create 'gowork))
+
+    ;; Comments.
+    (setq-local comment-start "// ")
+    (setq-local comment-end "")
+    (setq-local comment-start-skip (rx "//" (* (syntax whitespace))))
+
+    ;; Indent.
+    (setq-local indent-tabs-mode t
+                treesit-simple-indent-rules go-work-ts-mode--indent-rules)
+
+    ;; Font-lock.
+    (setq-local treesit-font-lock-settings go-work-ts-mode--font-lock-settings)
+    (setq-local treesit-font-lock-feature-list
+                '((comment)
+                  (keyword)
+                  (number)
+                  (bracket error operator)))
+
+    (treesit-major-mode-setup)))
+
+(if (treesit-ready-p 'gowork)
+    (add-to-list 'auto-mode-alist '("/go\\.work\\'" . go-work-ts-mode)))
+
 (provide 'go-ts-mode)
 
 ;;; go-ts-mode.el ends here
-- 
2.47.0


--=-=-=--




Acknowledgement sent to Gabriel Santos <gabrielsantosdesouza@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#74461; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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