unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* To the maintainers...
@ 2022-12-10 18:19 Perry Smith
  2022-12-11 23:07 ` Yuan Fu
  0 siblings, 1 reply; 2+ messages in thread
From: Perry Smith @ 2022-12-10 18:19 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]

treesit.el has this comment:

        ;; TODO: Document if genuinely useful.
        (cons 'n-p-gp
            ...

I found it useful:

           ((n-p-gp "}" "hash" "assignment") grand-parent 0)
           ((n-p-gp "pair" "hash" "assignment") grand-parent ruby-ts-mode-indent-offset)

           ((n-p-gp "]" "array" "assignment") grand-parent 0)
           ((n-p-gp ".*" "array" "assignment") grand-parent ruby-ts-mode-indent-offset)

Produces:

array = [
  9.9,
  10,
  11,
]

new_hash = {
  frog: 12,
  daft: 92,
  egg: 99
}


[-- Attachment #1.2: Type: text/html, Size: 2934 bytes --]

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: To the maintainers...
  2022-12-10 18:19 To the maintainers Perry Smith
@ 2022-12-11 23:07 ` Yuan Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2022-12-11 23:07 UTC (permalink / raw)
  To: Perry Smith; +Cc: emacs-devel



> On Dec 10, 2022, at 10:19 AM, Perry Smith <pedz@easesoftware.com> wrote:
> 
> treesit.el has this comment:
> 
>         ;; TODO: Document if genuinely useful.
>         (cons 'n-p-gp
>             ...
> 
> I found it useful:
> 
>            ((n-p-gp "}" "hash" "assignment") grand-parent 0)
>            ((n-p-gp "pair" "hash" "assignment") grand-parent ruby-ts-mode-indent-offset)
> 
>            ((n-p-gp "]" "array" "assignment") grand-parent 0)
>            ((n-p-gp ".*" "array" "assignment") grand-parent ruby-ts-mode-indent-offset)
> 
> Produces:
> 
> array = [
>   9.9,
>   10,
>   11,
> ]
> 
> new_hash = {
>   frog: 12,
>   daft: 92,
>   egg: 99
> }
> 

Sure, I’ll document it. Thanks :-)

Yuan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-11 23:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-10 18:19 To the maintainers Perry Smith
2022-12-11 23:07 ` Yuan Fu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).