In the Mathematica options inspector, there is an option called "HighlightMissingArgumentsWithTemplate".
If you turn it on, in case of missing arguments, instead of displaying a single red arrow, you will get a helpful hint with argument names which can serve as a super fast lightweight documentation (like you would get in, e.g., Xcode after autocompleting a function):
The names of the arguments are taken from pattern names in SyntaxInformation.
This PR adds names to all SyntaxInformation except for the built-in RulePlot thus enabling this feature for all SetReplace symbols.
This also adds missing usage messages, syntax information, and syntax autocompletion.
Expands argument names in usage messages to be descriptive so that using autocompleted templates are more informative.
Comments
Null is due to OptionsPattern[]. It can be changed to, say, opts if that pattern is named as opts : OptionsPattern[]. However, if one does that, some optional arguments will always be displayed in the template, which is, of course, unacceptable. I think we'll have to wait until this weed is fixed upstream:
Autocompletion is generally disabled for option names. The problem is that I'm not aware of a way to enable autocompletion for multiple arguments at a time. In order to solve this, we need to use symbols instead of strings for options (#604), and we need to figure out how to autocomplete the values for enum-like options (#605).
Changes
"HighlightMissingArgumentsWithTemplate"
.The names of the arguments are taken from pattern names in
SyntaxInformation
.This PR adds names to all
SyntaxInformation
except for the built-inRulePlot
thus enabling this feature for all SetReplace symbols.This also adds missing usage messages, syntax information, and syntax autocompletion.
Expands argument names in usage messages to be descriptive so that using autocompleted templates are more informative.
Comments
Null
is due toOptionsPattern[]
. It can be changed to, say,opts
if that pattern is named asopts : OptionsPattern[]
. However, if one does that, some optional arguments will always be displayed in the template, which is, of course, unacceptable. I think we'll have to wait until this weed is fixed upstream:This change is