From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70299: 30.0.50; go-ts-mode + tree-sitter-go@v0.20.0 no highlighting Date: Tue, 9 Apr 2024 14:08:01 +0100 Message-ID: References: <86y19nw1mh.fsf@gnu.org> <09BC30DC-A05E-4FF9-900F-C510C2AC04CE@gmail.com> Reply-To: Martin Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000045cd880615a99d78" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30758"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70299@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 09 15:09:23 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 1ruBE2-0007gD-FZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Apr 2024 15:09:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruBDd-0006zo-SH; Tue, 09 Apr 2024 09:08:57 -0400 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 1ruBDb-0006z3-5S for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 09:08:55 -0400 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 1ruBDa-00031H-SS for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 09:08:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruBDi-00009x-Kd for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 09:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Martin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Apr 2024 13:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70299 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70299-submit@debbugs.gnu.org id=B70299.1712668109560 (code B ref 70299); Tue, 09 Apr 2024 13:09:02 +0000 Original-Received: (at 70299) by debbugs.gnu.org; 9 Apr 2024 13:08:29 +0000 Original-Received: from localhost ([127.0.0.1]:48645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruBDA-00008y-FU for submit@debbugs.gnu.org; Tue, 09 Apr 2024 09:08:28 -0400 Original-Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:55374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruBD8-00008k-KV for 70299@debbugs.gnu.org; Tue, 09 Apr 2024 09:08:27 -0400 Original-Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1e2b137d666so41151385ad.2 for <70299@debbugs.gnu.org>; Tue, 09 Apr 2024 06:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1712668093; x=1713272893; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xSSEuRdPsAFQv/Xnslz31zCx7082O92E9KdpURvodnU=; b=JgbcQK+0v7FWn6TOx0ImlHRKXy2VHrxluzQQcq6SZW54ujWtPpCBOTdwTtSf8zF65P oeCGyzp7To9HX4Jv++Jnsj4myzOH4BHkl5Cb/x/09aWF2Ta3t/EOU8K/UMjz+fSmwZBU xHQiiBkW1fFA1jysbv78yTlT0NqzDW/gA8QzuFNmrhkuuCzvyK8/5J7A5AzTdrQFD91t q6LvrwH/matbET/u+tcvP/0ejzeGQrZjPXbeTM5tJyNqnw3Nd46oiBTRbMc42V+vRp1t lrne7ppVxGjizudugwgRCgOx/LyU5LwHLlawodX/9GPmQCRChHpu5FyDo/FcLOtP9Z6I ygMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712668093; x=1713272893; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xSSEuRdPsAFQv/Xnslz31zCx7082O92E9KdpURvodnU=; b=hYp4tI4p8dIpuFBMUVg+Am0uxVbZdjtV3mvrxByBpM1GbUBAXp6+xEB+1JgViZtlnC 6VFQVQdiBYy+11eKLiJH+yqNfnca7/chtFXo3TYOn3JxDXQRXEa2VqmM/28/cEkf/57z tne2fCLG/WhoLhQVXBf5+gkdBCvvYGRyrmfms0Hqo1kwLnIqIfzMCObTwt6t7dneL1gk LYJnMhO0iEI8lcv5tevNQewlXEpnlznVy70FJWqLtp0CtQeAphi19sDJGLBR4Xtbl8vm ra1gkcUM6FID8PgLFnI6rp7BI8Rt7m8ZEr5NtZpvD6RzvlT8N2RkpE9LzDVsaWHyVOcA MrbQ== X-Forwarded-Encrypted: i=1; AJvYcCVZGIji8J4+OfROpfAho2YWmgqfUUsKXuGIp0umLIStpwz9ld3XOdmTu57osYkFys/yztn3DAwuzdPkmmeelvsWaki8/U4= X-Gm-Message-State: AOJu0YyMVCUNsa2jpoMe3LPFsXz7mmLavcqnvbcs7xI8ikTQqFn+uouX v72kG4bPdsUvNffr9JlVJyvhxswnu2X4JbXFyVLTAqeWz5/SS+D0zqFN4wj4IPuKInmOF/ydnea iCuQQQfLvl2dmx55hph9ZAdPoCo8= X-Google-Smtp-Source: AGHT+IEtYKJWnaXQbaeXOdoLuEKSZh4bRdLOICnjpG4E1T3IXvQ5AIYrtrvEs6YesKYyamqaO+SuUZqckGPbgDmOuWU= X-Received: by 2002:a17:902:ce89:b0:1e4:24bc:426f with SMTP id f9-20020a170902ce8900b001e424bc426fmr6577333plg.24.1712668092515; Tue, 09 Apr 2024 06:08:12 -0700 (PDT) In-Reply-To: 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:282991 Archived-At: --00000000000045cd880615a99d78 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I can see this in *Messages* Error during redisplay: (jit-lock-function 6092) signaled (treesit-query-error "Node type error at" 150 "(function_declaration name: (identifier) @font-lock-function-name-face) (method_declaration name: (field_identifier) @font-lock-function-name-face) (method_spec name: (field_identifier) @font-lock-function-name-face) (field_declaration name: (field_identifier) @font-lock-property-name-face) (parameter_declaration name: (identifier) @font-lock-variable-name-face) (short_var_declaration left: (expression_list (identifier) @font-lock-variable-name-face (\",\" (identifier) @font-lock-variable-name-face) *)) (var_spec name: (identifier) @font-lock-variable-name-face (\",\" name: (identifier) @font-lock-variable-name-face) *)" "Debug the query with `treesit-query-validate'") On Tue, Apr 9, 2024 at 12:55=E2=80=AFPM Martin wrote: > I tried manually applying that patch to my local emacs - it didn't seem t= o > fix the issue of no syntax highlighting? > > On Tue, Apr 9, 2024 at 6:47=E2=80=AFAM Yuan Fu wrote: > >> >> >> > On Apr 8, 2024, at 10:23 PM, Eli Zaretskii wrote: >> > >> >> Date: Tue, 9 Apr 2024 00:43:57 +0100 >> >> From: Martin via "Bug reports for GNU Emacs, >> >> the Swiss army knife of text editors" >> >> >> >> - emacs -Q; >> >> - M-x treesit-install-language-grammar >> >> - go >> >> - github.com/tree-sitter/tree-sitter-go >> >> >> >> - Open up a new buffer and use go-ts-mode >> >> - Write some go-code >> >> ``` >> >> package my_pkg >> >> type myStruct struct {} >> >> func MyFunc(x context.Context) error {} >> >> ``` >> >> - Observe that there is no syntax highlighting >> >> - Observe that treesit-explore-mode seems to work properly >> >> - Conclude that there is something wrong with go-ts-mode's >> >> highlighting. There is highlighting with tree-sitter-go v0.19.1, but >> >> that grammar also seems to come with some bugs. >> > >> > Isn't this a duplicate of bug#70296? >> >> Yeah, Martin contacted me on Reddit because he didn=E2=80=99t know how t= o report >> this issue, and I told him he can use M-x bug-report-emacs, which he did= . >> Thanks Martin! >> >> Meanwhile I wrote a patch and sent it in bug#70296. Let me merge these >> two reports. >> >> Yuan > > --00000000000045cd880615a99d78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I can see this in *Messages*

Error during redispla= y: (jit-lock-function 6092) signaled (treesit-query-error "Node type e= rror at" 150 "(function_declaration name: (identifier) @font-lock= -function-name-face) (method_declaration name: (field_identifier) @font-loc= k-function-name-face) (method_spec name: (field_identifier) @font-lock-func= tion-name-face) (field_declaration name: (field_identifier) @font-lock-prop= erty-name-face) (parameter_declaration name: (identifier) @font-lock-variab= le-name-face) (short_var_declaration left: (expression_list (identifier) @f= ont-lock-variable-name-face (\",\" (identifier) @font-lock-variab= le-name-face) *)) (var_spec name: (identifier) @font-lock-variable-name-fac= e (\",\" name: (identifier) @font-lock-variable-name-face) *)&quo= t; "Debug the query with `treesit-query-validate'")

--00000000000045cd880615a99d78--