From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: treesit-language-source-alist: Presets and/or custom variable? Date: Wed, 18 Jan 2023 14:53:48 +0200 Message-ID: <83v8l40zs3.fsf@gnu.org> References: <86o7qwnjt0.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10504"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Arash Esbati Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 18 13:54:29 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 1pI7xU-0002Xf-FI for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Jan 2023 13:54:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pI7wn-0003pU-9w; Wed, 18 Jan 2023 07:53:45 -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 1pI7wl-0003p7-Fd for emacs-devel@gnu.org; Wed, 18 Jan 2023 07:53:43 -0500 Original-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 ) id 1pI7wl-0000yu-76 for emacs-devel@gnu.org; Wed, 18 Jan 2023 07:53:43 -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=Tid2bi12ya+2V6t7c9Z9cJBZ0ciJbT5oixgF6TS+cYU=; b=pZZ5cihJpCO7 z7D4SoaPV/lIUlOIEUn3vLhuQtSREHACTGCQrpMlgdz7eR8Lkg+MPr24pYhve5+xgw/yRU+lVkkjv PonSAqgjpVwnmhkzR64KWrEzMXuTd49Dd4AfhoL53jDMGcjwLkztxaKqZM/tCLlSmg82x1EyxzJYz gCNdUW5qL3W40asBEvucWtkg6IslmBng99WpwXFtS3B1OSSFWoA1VI3UT9K4U4Yld5zkfA1WNbttR RQ0xctnSpTOJjHsLmATHSg2zLSHfo8ZUZ+G/U3TOejWhJRc3OLpphdXLMZ4KAuT8EzqMpAwHNnPYi +A6v8gfHBPUwrOlay+pg+w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pI7wd-0007qI-GY; Wed, 18 Jan 2023 07:53:42 -0500 In-Reply-To: <86o7qwnjt0.fsf@gnu.org> (message from Arash Esbati on Wed, 18 Jan 2023 12:50:19 +0100) 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:302513 Archived-At: > From: Arash Esbati > Date: Wed, 18 Jan 2023 12:50:19 +0100 > > (setq treesit-language-source-alist > '((python . ("https://github.com/tree-sitter/tree-sitter-bash.git")) > (markdown . ("https://github.com/ikatyang/tree-sitter-markdown.git")) > (rust . ("https://github.com/tree-sitter/tree-sitter-rust.git")) > (elisp . ("https://github.com/Wilfred/tree-sitter-elisp.git")))) > > and did `M-x treesit-install-language-grammar RET LANG RET' four times > with languages above. I'm on Win10, so Emacs built 4 .dll files and put > them under ~/.emacs.d/tree-sitter/ -- that went smooth. In order to > make this more convenient for others, would it make sense to preset this > variable with parsers available from this site[1]? Sorry, no. This was already discussed, and the decision was not to populate the variable by default, so as not to increase our maintenance burden. Making grammar libraries available for Emacs users is the job of downstream distros, not ours. We have enough on our plate already. > Further, it seems to me that this is a user-settable variable, so I'd > suggest to make it customizable. It isn't supposed to be a defcustom, as it's supposed to be populated as you compile libraries.