template_hint.pl -- Generate template hints for CondeMirror
Provide templates for the Prolog template-hinting functionality of the SWISH editor.
- visible_predicate_templates(+Module, +Options, -Templates) is det
- True when Templates is a JSON dict holding autocompletion templates for Module.
- 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.
- visible_from(+Spec, -PI, +Module, +Options) is nondet[private]
- Provide complates from a selected specification. Defined
specifications are
built_in
or the specification of a file, e.g., library(lists). - safe(+Goal, +Options) is semidet[private]
- True if Goal is sometimes safe. Note that meta-predicates are never immediately safe.
- predicate_template(:PI, -Template:json) is semidet
- man_predicate_info(+PI, -Pair) is nondet[private]
- Extract the mode line from the SWI-Prolog manual.
- pldoc_predicate_info(+PI, -ModeLine) is semidet[private]
- rendering_template(-Template)[private]
- Create a template for the SWISH rendering modules.
- library_template(-Template, +Options) is det[private]
- Produce a template for selecting libraries. By default, this
enumerates all Prolog files under the file alias
library
. If Options includesfrom(FromList)
, this is interpreted similar to visible_predicate/3. - library_files(+Alias, +SubDir, -Files, -Dirs)[private]
- True when Files is a list of files that can be loaded from Alias(SubDir) and Dirs is a list of sub directories of Files.
- library_template_from(+From:list, -Template) is det[private]
- As library_template/1, but build the completion list from a given set of libraries.
- imported_library(+Module, -Library) is nondet[private]
- True when Library is imported into Module.
- visible_lib(+Module, -Lib) is nondet[private]
- Enumerate modules imported into Module and generally useful modules.
- 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.