PublicShow sourcetemplate_hint.pl -- Generate template hints for CondeMirror

Provide templates for the Prolog template-hinting functionality of the SWISH editor.

To be done
- For which predicates should we generate templates? Should we provide templates on demand?
- What about safely?
- Dedicated template for the rendering support?
Source visible_predicate_templates(+Module, +Options, -Templates) is det
True when Templates is a JSON dict holding autocompletion templates for Module.
Source visible_predicate(?PI, +Module, +Options) is nondet
True when PI is a plain predicate indicator for a predicate that can be called in Module. Additional options:
safe(+Boolean)
If true, filter out unsafe predicates.
autoload(+Boolean)
Load autoloadable predicates.
Source predicate_template(:PI, -Template:json) is semidet
Arguments:
Template- is a dict holding the keys below. Only mode is guaranteed to be present.
mode
String holding the mode-line. Always present.
summary
Summary description.
iso
true if the predicate is an ISO predicate.
determinism
Determinism indicator (if known)
To be done
- Deal with locally redefined predicates, etc.
Source swish_config:config(-Name, -Styles) is det[multifile]
Provides the object config.swish.templates, a JSON object that provides the templates for hinting in CodeMirror.