From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: tree-sitter version? Date: Thu, 24 Nov 2022 06:54:53 +0100 Message-ID: <87cz9cevns.fsf@gnu.org> References: <70973BD9-26D2-4833-A429-8434FC03026B@gmail.com> 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="11083"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 29.0.50 Cc: "T.V Raman" , emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 24 07:04:32 2022 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 1oy5Lc-0002et-Cj for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Nov 2022 07:04:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy5Kq-0002E4-Io; Thu, 24 Nov 2022 01:03:44 -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 1oy5Ko-0002Db-JJ for emacs-devel@gnu.org; Thu, 24 Nov 2022 01:03:42 -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 1oy5Kn-0004y6-Vp; Thu, 24 Nov 2022 01:03:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=R/2nwGlJkmrb9LE3Lqtt+9rKhX4e20HvQc1ELyQPe7E=; b=nQ+WUd4mUlmyLx TmW55P8QqzzwskGRoLKlb5QQ8u1PgtQnSkDwJFkxhUwnGO5ldD8geK3U3twmy94HttFuiB9WkXZny XKjLN6MB+6TZ99pAhpTmeaH/U+nAcFRA2NyjmaVjWz8GRRkBmVbPNMUU7TsT/6Gg1NYDA6VxUZ6nm eHJJ5ICTkswuLhmfP0cHkTlyYptMbQqIWiGJepEpc5EBDin7ILniDnNc6UVuf7wKUcEmy90AP6zj8 9vwuEKt6uXFIvd3yviL6TF8lMC0iRBbulWB0hpFIAdup8j4znGPOwAPUl5eNyn0ly4hORZHCGFJeR LAoD2dA2IvFTFaacRObA==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oy5Kn-0004Z5-Ak; Thu, 24 Nov 2022 01:03:41 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id A4BD027C0054; Thu, 24 Nov 2022 01:03:40 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 24 Nov 2022 01:03:40 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedriedvgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffjgfkgggtgfesthhqredttderjeenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe fgtedtudeivdfhfffhfefhvefhuedvheejjeefleffheekffeutdfhgfejiefhgeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 01:03:39 -0500 (EST) In-reply-to: <70973BD9-26D2-4833-A429-8434FC03026B@gmail.com> 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:300425 Archived-At: Yuan Fu writes: Hi Yuan, >> So: am I supposed to install tree-sitter from github or from debian's >> package manager? > > Either should be fine. Ah, I was wondering the same when I wanted to give tree-sitter a try. I have tree-sitter 0.20.7 installed but the configure output said ">=3D0.20.2 no" but only reported a >=3D 0.6.x version. It still works fine. :-) >> I first did the package-manager version, then pulled from github and >> installed that -- configure shows that tree-sitter is detected -- but >> calling any of the tree-sitter modes, eg c-ts-mode barfs with an >> error saying that support is not available. > > If you call tree-sitter-available-p, what do you get? Most likely you > don=E2=80=99t have the relevant language definition/grammar for those > modes. You can probably find them on package managers, or you can > build with the script here: Indeed, that was the next trap I fell in. On Arch, tree-sitter is in the community repository (so basically almost official) whereas the language definitions are only on the AUR. Maybe the NEWS entry should tell more clearly that tree-sitter needs to be system-installed and also the language definitions need to be grabbed somewhere. BTW, how can a user decide that tree-sitter modes should be used? For example, when I open a json file I get js-json-mode, not json-ts-mode, which also works, so support is available. Should user's augment auto-mode-alist? Or is there some "enable TS whenever possible and the devs think its support is in a usable state for that language" toggle? Bye, Tassilo