From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.devel Subject: How to tell tree-sitter to look for libtree-sitter-go-mod.so instead of libtree-sitter-gomod.so? Date: Tue, 26 Sep 2023 13:28:10 +0530 Message-ID: <87sf718iy5.fsf@codeisgreat.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="33271"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 26 09:59:14 2023 Return-path: Envelope-to: ged-emacs-devel@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 1ql2yQ-0008RZ-Hd for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Sep 2023 09:59:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ql2xi-0005Bq-KJ; Tue, 26 Sep 2023 03:58:30 -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 1ql2xf-0005An-Qf for emacs-devel@gnu.org; Tue, 26 Sep 2023 03:58:28 -0400 Original-Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ql2xU-0006Wf-JJ for emacs-devel@gnu.org; Tue, 26 Sep 2023 03:58:25 -0400 Original-Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-59c26aa19b7so99559027b3.2 for ; Tue, 26 Sep 2023 00:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-com.20230601.gappssmtp.com; s=20230601; t=1695715094; x=1696319894; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :mail-followup-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=SU1Vl5G+xnuvrNHbLZFPBqloVP2O8IAVwp37YZ42uJk=; b=cG5NLwHS91mBeO0R23YXDmKp9k5wyUQB2FkBwPEI5Yrath9B8mMOfHDCG1ILcWzf/a ehwKQXW9UT6/QvKSt2T9qMFFcemfKdL4UURRsGpNZxHR6QtIEq/kOWaSDRGJh+qq740d m3oeFZUJX4m9utf73z7+IiU6QSy7Ba4EljZvilfMgL+HJgE+B2P4i1z0mKFw9Xt41u94 GIq44BmCVC8Cb3AgPP7BjMY4T/OMcckeSqsOYiKmT2Z2R8B7wcFwsQL0xIYCVn0yWxPD PRF4J556qqF190O52p1eS5p1ThcNsKDwSYfSUsGhWAqr8Bjgfv4W+y1C8XHDT9BwAPho 2uQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695715094; x=1696319894; h=content-transfer-encoding:mime-version:user-agent:message-id:date :mail-followup-to:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SU1Vl5G+xnuvrNHbLZFPBqloVP2O8IAVwp37YZ42uJk=; b=C6UN/ry4FXrWoiVUfTPRNoXprFU35WRcR0+30c3fwWBIgAWdcRzr8rzAaVHmp+vX18 OG1/YjY0xDxMv33dXNeVaRPaBUhubU0ZTrXU+SLqVMZxc7wGGI2NcGYgYMjLk/vusBF+ NZScSzKt5UC7MQamPWts6yeASlkaTljQpU/OQr0WID6RyPGfTiE+iVzIX049KztjZxg3 oyoY0nAslqW1Ti+DNIgPar2cfJ+J5DqCpP2yYhP37/qt18bd4eEilG1R0ReupxfKIWkK kdhoMpTKew8Bkjnm/ZaKvIem7PNHDAIwYHgNwr2oejXab1gxPDC6ioruRRbYYJJd/1z6 SoHw== X-Gm-Message-State: AOJu0YwNP+RQQmiXpxyjOeBOPbAwrGBycDYjXwzpQwZvoV0LMfwZIuQg 6DY0JzW3Nkd6EsCCMZx7YasyAKt2kMEs4OpaOTk= X-Google-Smtp-Source: AGHT+IHWt4q7xeQN9qMxUnV8zvGko3Cyemgshe/kwRk/gb5f/bALuX8/cbvxzfWfC47hg/SOJ6kWWg== X-Received: by 2002:a05:690c:3347:b0:59f:661d:9f1e with SMTP id fk7-20020a05690c334700b0059f661d9f1emr6520432ywb.4.1695715094331; Tue, 26 Sep 2023 00:58:14 -0700 (PDT) Original-Received: from anant ([49.36.237.146]) by smtp.gmail.com with ESMTPSA id u25-20020a63a919000000b0057ab7d42a4dsm8833841pge.86.2023.09.26.00.58.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 00:58:13 -0700 (PDT) Mail-Followup-To: Emacs Development Received-SPF: none client-ip=2607:f8b0:4864:20::1129; envelope-from=pankaj@codeisgreat.com; helo=mail-yw1-x1129.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311048 Archived-At: I am on emacs-29 branch. I have following settings for go in the ~/.emacs.d/init.el, #+begin_src elisp (setq treesit-language-source-alist '((go . ("https://github.com/tree-sitter/tree-sitter-go.git")) (go-mod . ("https://github.com/camdencheek/tree-sitter-gomod.git")))) (add-to-list 'auto-mode-alist `("\\.go\\'" . go-ts-mode)) (add-to-list 'auto-mode-alist `("\\go.mod\\'" . go-mod-ts-mode)) #+end_src whenever I load .go or go.mod files, I get this error, --8<---------------cut here---------------start------------->8--- =E2=9B=94 Warning (treesit): Cannot activate tree-sitter, because language = grammar for gomod is unavailable (not-found): (libtree-sitter-gomod libtree= -sitter-gomod.0 libtree-sitter-gomod.0.0 libtree-sitter-gomod.so libtree-si= tter-gomod.so.0 libtree-sitter-gomod.so.0.0) No such file or directory --8<---------------cut here---------------end--------------->8--- Emacs is looking for libtree-sitter-gomod.so, but in fact the library's name is libtree-sitter-go-mod.so. Where can I tell tree-sitter to look for the appropriate file. Or is this a bug?