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: Tree-sitter and major mode inheritance Date: Sun, 20 Nov 2022 16:42:56 +0200 Message-ID: <83edtx661b.fsf@gnu.org> References: <0249C656-21C8-49F2-B979-A1894BF80637@gmail.com> <1B76E73A-0DCD-456E-9F28-0E90723DA66D@gmail.com> <83sfif8cl2.fsf@gnu.org> <83cz9i6rvl.fsf@gnu.org> <32f83435-f655-f0db-891c-8244df084299@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="833"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, theo@thornhill.no To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 20 15:43:23 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 1owlXW-000Ac9-Uj for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Nov 2022 15:43:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owlX0-0004fN-AR; Sun, 20 Nov 2022 09:42:50 -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 1owlWz-0004fF-At for emacs-devel@gnu.org; Sun, 20 Nov 2022 09:42:49 -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 1owlWx-0004Pa-SY; Sun, 20 Nov 2022 09:42:47 -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=Cx5LG4Cdi75CVVAU0p6FR2FZusRidTyrhca3BvhlKDA=; b=CfV+cW+qody3 1DmLkmWpfd3x++bswSUUPzlpWD1na1KQFSTuG4lP4GMgdX4Z48Ob5jiWgl93gNHsII2nwRVZ1MZO1 fo+wmGRJmzw/hvGWpc/CJAWtmkwzHhi24Up/RWmeGx0rfPyzke9h5chhDAHgu4lODbLzs4JT7BSVb 6EqQEiHgj6ibl9OVEDB+3U76U5qYf5jiB2WGY1mgTQtsrEQgacpw9Ldz9fSZSyswqEwUW6wJInVNB 0ojYg+S2Qgmf6s0slner3h+oczARzS+Y/CyHa3u0s21hoD5D+iiJOtMRNVVH4VWPzcXNkZS4MrWis zoHODgSwmEC30pZ3A6IXsg==; 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 1owlWx-0000Su-CW; Sun, 20 Nov 2022 09:42:47 -0500 In-Reply-To: <32f83435-f655-f0db-891c-8244df084299@yandex.ru> (message from Dmitry Gutov on Sun, 20 Nov 2022 14:45:59 +0200) 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:300246 Archived-At: > Date: Sun, 20 Nov 2022 14:45:59 +0200 > Cc: casouri@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, > theo@thornhill.no > From: Dmitry Gutov > > On 20.11.2022 08:51, Eli Zaretskii wrote: > >> But js2-mode inherits from js-mode (meaning, it will run the same setup > >> code, and then some of its own), yet it has its own parser. Which will > >> cause all sorts of conflicts with tree-sitter. > > js2-mode is not in Emacs, so I cannot control what it does. Ideally, it > > will need only minor adjustments (like making sure it doesn't turn on > > tree-sitter if it doesn't want to) or none at all. > > That was my question: how would those "minor adjustments" look if not > the way Yuan proposed things. I don't know, sorry. First, Yuan didn't yet finish adjusting the code to what we have said here today. And on top of that, I'm not familiar with js2-mode, so I'd be grateful if someone else could tell what would be needed there (when that is clear).