From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: treesit-forward-sexp (was: Make all tree-sitter modes optional) Date: Tue, 17 Jan 2023 18:40:16 +0100 Message-ID: References: <84973.1672843723@hassadar.pretzelnet.org> <83wn62xi3k.fsf@gnu.org> <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <831qnu64la.fsf@gnu.org> <83o7qy4l2v.fsf@gnu.org> <55d39dcb-de2f-fe02-e069-f1dd1e50e59b@yandex.ru> <83edru4jaj.fsf@gnu.org> <83sfg92ryn.fsf@gnu.org> <86h6wp5h1j.fsf_-_@mail.linkov.net> 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="31392"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Juri Linkov , Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 17 18:41:30 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 1pHpxh-00080d-OE for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Jan 2023 18:41:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHpws-0001cL-2Y; Tue, 17 Jan 2023 12:40:38 -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 1pHpwi-0001bc-Ki for emacs-devel@gnu.org; Tue, 17 Jan 2023 12:40:30 -0500 Original-Received: from out-77.mta0.migadu.com ([91.218.175.77]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpwe-0001C9-Kv for emacs-devel@gnu.org; Tue, 17 Jan 2023 12:40:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1673977220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ms9Pjyjo5pZrEVC+AwnTAbydJ5XbWziPFiNkZmlaqo=; b=KM2jo9BzGqMwVG+/DeQVdEqcdX3g6i0A9ptOZfjpIflsbigAQBUrILeIwFBUi/t0BASgCA n4CXSLUI2KgxTnQA+agSpTRzRosfhJ81IyOxE6NrK+03sTgATxQG32762X4mNDGvK12f7v WkjOVQu2s2HiFAjL0jYN7K6QcE4ozANmkXaiLgNVpNXDjaTY04C7noJXqWVj6E6HJt5VJP veYNIGuZTR7kFJrlPyMXFL16J+DeVQTk0Mo5xaFz8nl9Lr4E70TMpdk4g5XIyBJlb9dk7F RocxkCVnkBXJWNMwv7PzkNtNdR3A3rv6hOHC8VceEjukkabGqntfm63Bidynng== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <86h6wp5h1j.fsf_-_@mail.linkov.net> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.77; envelope-from=theo@thornhill.no; helo=out-77.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:302487 Archived-At: On 17 January 2023 18:34:04 CET, Juri Linkov wrote: >> I'm using ruby-mode, at least for now, while all the wrinkles with >> indentation haven't been ironed out (and we'll probably not manage to g= et >> them all 100% right before the 29 release), and while ts modes don't >> support show-paren-mode like SMIE does=2E No proper sexp navigation, et= c=2E > >BTW, how ruby-ts-mode is intended to be used without proper sexp navigati= on? > >I see that forward-sentence support for tree sitter was added recently >with treesit-forward-sentence=2E There are also treesit-transpose-sexps, >treesit-beginning-of-defun and treesit-end-of-defun=2E > >Are there any plans to add treesit-forward-sexp as well? Yes, working on it now :) > >Currently I'm using such workaround: > >``` >(with-eval-after-load 'ruby-ts-mode > (add-hook 'ruby-ts-mode-hook > (lambda () > (smie-setup ruby-smie-grammar #'ruby-smie-rules > :forward-token #'ruby-smie--forward-token > :backward-token #'ruby-smie--backward-token)))) >``` > >Maybe something like this should be added to emacs-29 >until treesit-forward-sexp is implemented in master? Theo