HydrogenProvider
Version: 1.0.0
The Plugin API allows you to make Hydrogen awesome. You will be able to interact with this class in your Hydrogen Plugin using Atom's Service API.
Take a look at our Example Plugin and the Atom Flight Manual for learning how to interact with Hydrogen in your own plugin.
onDidChangeKernel(Callback)
Calls your callback when the kernel has changed.
Params:
- Function Callback
getActiveKernel()
Get the HydrogenKernel
of the currently active text editor.
Return:
- Class
HydrogenKernel
getCellRange()
Get the atom$Range
that will run if hydrogen:run-cell
is called.
null
is returned if no active text editor.
Return:
- Class
atom$Range
HydrogenKernel
The HydrogenKernel
class wraps Hydrogen's internal representation of kernels
and exposes a small set of methods that should be usable by plugins.
language
The language of the kernel, as specified in its kernelspec
displayName
The display name of the kernel, as specified in its kernelspec
addMiddleware(middleware)
Add a kernel middleware, which allows intercepting and issuing commands to the kernel.
If the methods of a middleware
object are added/modified/deleted after
addMiddleware
has been called, the changes will take effect immediately.
Params:
- HydrogenKernelMiddleware middleware
onDidDestroy(Callback)
Calls your callback when the kernel has been destroyed.
Params:
- Function Callback
getConnectionFile()
Get the connection file of the kernel.
Return:
- String Path to connection file.