unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Setting up indent-on-type in a treesit based major-mode
@ 2024-10-20 19:09 Karan Ahlawat
  0 siblings, 0 replies; only message in thread
From: Karan Ahlawat @ 2024-10-20 19:09 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

Today I was using ruby-ts-mode and found out that it can indent some 
keywords as soon as they're typed out fully (example, when inside a case 
block). I'd love to implement such a feature in scala-ts-mode, so I 
looked at the source code, but could not see anything special it might 
be doing besides simple treesit indent setup.

So, how does it exactly achieve this indent-on-type behavior (I can see 
the matcher being called if I set treesit--indent-verbose to t), and how 
could I reproduce this in my own major-mode?

Thanks,

Karan


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-20 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 19:09 Setting up indent-on-type in a treesit based major-mode Karan Ahlawat

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).