From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration on feature/tree-sitter Date: Sun, 8 May 2022 23:57:48 +0300 Message-ID: <09a919d4-750f-121f-5ea8-3f193eb71c0c@yandex.ru> References: <9E6D13F6-7E50-44EE-A357-C971A11A3636@gmail.com> <837d6xzpac.fsf@gnu.org> <7B1F29B4-045A-420E-8FD7-C7C72FF14DDC@gmail.com> <837d6xxjpv.fsf@gnu.org> <834k21xhzd.fsf@gnu.org> <26ADA626-793E-4E21-9502-63675A7ED16B@gmail.com> <871qx5je4q.fsf@thornhill.no> <83mtfswnrj.fsf@gnu.org> <831qx4w42a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29009"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Cc: theo@thornhill.no, casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 08 22:58:30 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 1nnnz3-0007MA-Ul for ged-emacs-devel@m.gmane-mx.org; Sun, 08 May 2022 22:58:29 +0200 Original-Received: from localhost ([::1]:37992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnnz2-00025j-Td for ged-emacs-devel@m.gmane-mx.org; Sun, 08 May 2022 16:58:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnnyU-0001Po-8A for emacs-devel@gnu.org; Sun, 08 May 2022 16:57:54 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:53073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnnyS-0007Lz-4r; Sun, 08 May 2022 16:57:53 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id k126so7379082wme.2; Sun, 08 May 2022 13:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=rH6HEK0d1arI8KfbG7dQw7pSZffNe63xyllsI3HdwHQ=; b=L7jO1wyPxqpY570WX74QSrq4SgOftqy0L7AeekC8W6JOd7PnStu4JMSY7moi/a6ZNn z3KfELF4A0PIFy0Z9Vfk1/O6BiP5i7X74uzWibCWAOCbiC6C3EGgEChFNPZ9az10LrB0 zpsNRgMH/efXM4W8uzV4bdmCsqaycPduk+8ueUGANpRwHgMnZ05PpIojEYibmpnxCNBt 5W+EfvbeS9vdZUM9Qb4p7Dm1C6yVV9D8dIUAMBVnRiZDxZ6fkZsNfvPl5/L2pbPhTKDn 1yreV8y0WGm3woE3zyQ/B8a4vf1tABuEvkIvNsDzx0hGII9AsuRjc6qeR/0psUiX0IJ0 g8Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=rH6HEK0d1arI8KfbG7dQw7pSZffNe63xyllsI3HdwHQ=; b=3kSjGzgQkuglMZC4BBj2GObxknpN9D/PIbSJwSBABnHPXfaLDyUxRsxYdxo2v8gbeR TgjMPlv4lUSVc0fmwpEFaFv2TNX3XMlJaxuW+ftRwMzo1U7FuAZQCg8a6qTiw44a3U1H RXcZy4df3yXyr9LwTl/bzpUpkaNIn3sgOin5/Db+UzfVBDW7vuqPAYKkwhgpNks48AC6 aF48xFZ1omqroOq3jRTuBNyGZCENwWPzn6eiYxYW07QiVSSnIBYY/g2kYxr54GPR9gOD 27ehngud/uiF2sU1yPgxjElaFGESR89YB1SIkWTF9yLfdcSpEaAQyhHRDlZyge4XXVBi 9Qkw== X-Gm-Message-State: AOAM531pgImPm8mrEFdw9kuReB+3udooU3wUBJNO191ZBLTrG8be8jqE OKmWEeUQt2hP5KXNi/saSBx4ZeciQuHdJg== X-Google-Smtp-Source: ABdhPJwsSQ0NGVrdV1P/YU9DHd3rN4C0EMpnp3Jr4ljvWsAQHuhfJq5G8qIGgt0nuqCJpZc5gc/c4Q== X-Received: by 2002:a05:600c:204b:b0:394:4028:b0f9 with SMTP id p11-20020a05600c204b00b003944028b0f9mr13032594wmg.114.1652043470299; Sun, 08 May 2022 13:57:50 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id f10-20020adffcca000000b0020c5253d8f9sm9491120wrs.69.2022.05.08.13.57.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 May 2022 13:57:49 -0700 (PDT) Content-Language: en-US In-Reply-To: <831qx4w42a.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:289497 Archived-At: On 08.05.2022 16:23, Eli Zaretskii wrote: >> From: Stefan Monnier >> Cc: Eli Zaretskii,theo@thornhill.no,casouri@gmail.com, >> emacs-devel@gnu.org >> Date: Sun, 08 May 2022 08:16:48 -0400 >> >> Dmitry Gutov [2022-05-08 15:05:06] wrote: >>> On 08.05.2022 09:18, Eli Zaretskii wrote: >>>> While doing so, we should be aware and beware of the potential >>>> copyright issues. It is best for someone to read the code and >>>> describe the ideas, and for someone else to implement those ideas >>>> without looking at the code. >>> We're talking about borrowing from Free Software editors, aren't we? >> And we're not talking about borrowing code, but talking about sharing >> the*format* of the indentation and highlighting rules. > AFAIU, we are just waving hands, because what code will be borrowed > and whether it will be is anyone's guess at this point. So I just > wanted people to be aware of the issue when they borrow ... whatever. Atom uses format like: https://github.com/atom/language-javascript/pull/608/files Support for it was implemented in https://github.com/atom/atom/pull/18321/ (but it would be easier to reimplement that in Elisp than try to "export" it via some kind of JS translation). https://github.com/emacsmirror/tree-sitter-indent/blob/master/tree-sitter-indent.el is an existing third-party package for Emacs for Tree Sitter which does that. Though they seem to copy the indentation rules by hand (for now, only for Rust and Julia, it seems). It should be possible to automate the latter export, though as long as the rules fit on one screen, manual translation should remain feasible.