Closed mbutterick closed 8 years ago
It does seem like it would be nice if DrRacket let you specify the default content of those 8 spots (4 lists and 4 regexps) on a per-language basis instead of globally.
How about calling this method (now that it has an optional argument for you to use) from your indentation predicate?
https://github.com/racket/gui/commit/7c857706d75f03155a03eb4de8e556865a5f528c
Thank you. This works well.
FWIW I find get-keyword-type
a confusing name, as its idea of “keyword” conflicts with the much more pervasive usage throughout Racket of “keyword” in the sense of “keyword argument” (even within the DrRacket docs).
I’m not sure I have a better suggestion, though. Arguably, get-identifier-type
would be more accurate, yet also too generic. These identifiers only accrue their special indentation status in the first position of an S-expression. carword
perhaps?
Okay, I went with a different name.
https://github.com/racket/gui/commit/af33c705589c7273c2d967ff2287774572b46390
I know how to use
'drracket:indentation
to use a custom indenter in a#lang
. But all I’m doing with my custom indenter is handling a few custom keywords, and otherwise relying on the default indenter.But this amounts to indenting in two passes. Is it possible to accomplish this in a more lightweight manner — specifically, by appending new keywords to DrRacket’s existing classes of keywords?