bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode


From: Dmitry Gutov
Subject: bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode
Date: Mon, 3 Apr 2023 23:41:41 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 03/04/2023 19:03, Juri Linkov wrote:
Looking at test/lisp/progmodes/ruby-mode-resources/ruby.rb
for example here curly brackets are not matched with 'C-M-f C-M-b'
in string interpolation and regexps:
    "abc/#{ddf}ghi"
    /foo/xi != %r{bar}mo.tee
Do you think it is possible to handle these cases
by crafting treesit-sexp-type-regexp?
I don't think so. tree-sitter parse tree has no information about these
parens or their positions.
Actually, it has information about string interpolation,
so adding "interpolation" to 'treesit-sexp-type-regexp'
allows to navigate "#{ddf}" in "abc/#{ddf}ghi".

Now added in commit bd5c1d1cbbd.

Note that it doesn't pair the curly braces either: the beginning is before '#'.

But other paired characters in strings have no parsed information
and need examining the text in the buffer indeed.

Right.





reply via email to

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