[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

treesit-forward-sexp (was: Make all tree-sitter modes optional)

From: Juri Linkov
Subject: treesit-forward-sexp (was: Make all tree-sitter modes optional)
Date: Tue, 17 Jan 2023 19:34:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> 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 get
> them all 100% right before the 29 release), and while ts modes don't
> support show-paren-mode like SMIE does. No proper sexp navigation, etc.

BTW, how ruby-ts-mode is intended to be used without proper sexp navigation?

I see that forward-sentence support for tree sitter was added recently
with treesit-forward-sentence.  There are also treesit-transpose-sexps,
treesit-beginning-of-defun and treesit-end-of-defun.

Are there any plans to add treesit-forward-sexp as well?

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]