[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: |
Juri Linkov |
Subject: |
bug#62416: 30.0.50; Symbols skipped in the navigation in ruby-ts-mode |
Date: |
Mon, 03 Apr 2023 19:03:34 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>> 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".
But other paired characters in strings have no parsed information
and need examining the text in the buffer indeed.