Module scnvim.help
Help system.
Convert schelp files into plain text by using an external program (e.g. pandoc) and display them in nvim.
Uses the built-in HelpBrowser if no config.documentation.cmd
is found.
Users and plugin authors can override config.documentation.on_open
and
config.documentation.on_select
callbacks to display help files or method
results.
See also:
Actions
on_open | Action that runs when a help file is opened. |
on_select | Action that runs when selecting documentation for a method. |
Functions
get_docmap (target_dir) | Get a table with a documentation overview |
open_help_for (subject) | Open a help file. |
render_all (callback, include_extensions, concurrent_jobs) | Render all help files. |
Actions
- on_open
-
Action that runs when a help file is opened.
The default is to open a split buffer.
- err nil on success or reason of error
- uri Help file URI
- pattern (optional) move cursor to line matching regex pattern
- on_select
-
Action that runs when selecting documentation for a method.
The default is to present the results in the quickfix window.
- err nil if no error otherwise string
- results Table with results
Functions
- get_docmap (target_dir)
-
Get a table with a documentation overview
Parameters:
- target_dir The target help directory (SCDoc.helpTargetDir)
Returns:
-
A JSON formatted string
- open_help_for (subject)
-
Open a help file.
Parameters:
- subject The help subject (SinOsc, tanh, etc.)
- render_all (callback, include_extensions, concurrent_jobs)
-
Render all help files.
Parameters:
- callback Run this callback on completion.
- include_extensions Include SCClassLibrary extensions.
- concurrent_jobs Number of parallel jobs (default: 8)