Improve treesit settings for js/typescript/ruby-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-list-nodes): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--list-nodes): Replace leaf "string" with "template_string" and "template_substitution" that can contain more nodes. * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add the 'sentence' thing to treesit-thing-settings.
This commit is contained in:
parent
82affcaeff
commit
63cc542b94
3 changed files with 10 additions and 2 deletions
|
|
@ -3919,7 +3919,8 @@ See `treesit-thing-settings' for more information.")
|
|||
"jsx_element"
|
||||
"jsx_expression"
|
||||
"jsx_self_closing_element"
|
||||
"string"
|
||||
"template_string"
|
||||
"template_substitution"
|
||||
"regex"
|
||||
"arguments"
|
||||
"class_body"
|
||||
|
|
|
|||
|
|
@ -1253,6 +1253,11 @@ leading double colon is not added."
|
|||
"hash")
|
||||
eos)
|
||||
#'ruby-ts--list-p))
|
||||
(sentence ,(rx bos (or "return"
|
||||
"body_statement"
|
||||
"call"
|
||||
"assignment")
|
||||
eos))
|
||||
(text ,(lambda (node)
|
||||
(or (member (treesit-node-type node)
|
||||
'("comment" "string_content" "heredoc_content"))
|
||||
|
|
|
|||
|
|
@ -495,12 +495,14 @@ See `treesit-thing-settings' for more information.")
|
|||
"object_pattern"
|
||||
"array"
|
||||
"array_pattern"
|
||||
"string"
|
||||
"template_string"
|
||||
"template_substitution"
|
||||
"regex"
|
||||
"arguments"
|
||||
"class_body"
|
||||
"formal_parameters"
|
||||
"computed_property_name"
|
||||
;; TypeScript
|
||||
"decorator_parenthesized_expression"
|
||||
"enum_body"
|
||||
"parenthesized_type"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue