From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Randy Taylor Newsgroups: gmane.emacs.bugs Subject: bug#74461: [PATCH] Add go-work-ts-mode Date: Fri, 22 Nov 2024 02:36:34 +0000 Message-ID: <7g_lFfcT8qujFnYQf_CP_H5BcQoDJXILzCt6I5B928kotWbz7YH-RAKORmjif0cK8KXQdPbkAnRmAEm8VFxLqa15j_I4ANIPgCnOKShEIxA=@rjt.dev> References: <877c8wvp34.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17075"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 74461@debbugs.gnu.org To: Gabriel Santos Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 22 03:37:36 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tEJY8-0004JV-2G for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Nov 2024 03:37:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEJXq-0006Bn-3M; Thu, 21 Nov 2024 21:37:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEJXi-0006BI-OH for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 21:37:13 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tEJXa-00028D-DI for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 21:37:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=aHDQ7gZYhWMYuBt8Z21BoZbZL0PFZrJOELaEce4TvBM=; b=LsXG8kxzuxnFAReaAiM3G18IKk427B+Oa4xgPjMcwxgxomUlti+6LQ/PpI8hs3KyoufusfpTcCDq1QSVUtBCECY0XhumHwXclX7ng4zE8kAXoAkiuxSYkUydy7xWzgnVJSo6CcmGjgaEBJMpLUMowsT9cEYHE7nmR8sduwrR/YwU1qv7A1jy+QG08cjsxQktQKo4Kf6VS70aBtjFnPAe/h1X0Tf9O6A3b1hi+baW+patyRHUl1mGz+4gGSmbnbKpe8VW2qJ56K3p7V2maFbJCwK9OWeLhw2DrdZRRy1SSJxxzv9o/7Sf6fgFdojFutZmgkB1+7gj2kT9+DwRdSTYSA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEJXa-0005Sr-7h for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 21:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Randy Taylor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Nov 2024 02:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74461 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74461-submit@debbugs.gnu.org id=B74461.173224300720980 (code B ref 74461); Fri, 22 Nov 2024 02:37:02 +0000 Original-Received: (at 74461) by debbugs.gnu.org; 22 Nov 2024 02:36:47 +0000 Original-Received: from localhost ([127.0.0.1]:52386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEJXK-0005SK-L3 for submit@debbugs.gnu.org; Thu, 21 Nov 2024 21:36:47 -0500 Original-Received: from mail-4022.proton.ch ([185.70.40.22]:19365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEJXI-0005S7-Vt for 74461@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== In-Reply-To: <877c8wvp34.fsf@disroot.org> Feedback-ID: 44397038:user:proton X-Pm-Message-ID: 07aa0371597fc19da788ba822b1bcef94ed0b4f3 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295762 Archived-At: On Thursday, November 21st, 2024 at 05:49, Gabriel Santos via "Bug reports = for GNU Emacs, the Swiss army knife of text editors" 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.