Module scnvim

Main module.

Info:

  • License: GPLv3
  • Author: David Granström

Functions

setup (user_config) Setup function.
send (expr) Evaluate an expression.
send_silent (expr) Evaluate an expression without feedback from the post window.
eval (expr, cb) Evaluate an expression and get the return value in lua.
start () Start sclang.
stop () Stop sclang.
recompile () Recompile class library.
is_running () Determine if a sclang process is active.
register_extension (ext) Register an extension.
load_extension (name) Load an extension.


Functions

setup (user_config)
Setup function.

This function is called from the user's config to initialize scnvim.

Parameters:

  • user_config A user config or an empty table.
send (expr)
Evaluate an expression.

Parameters:

  • expr Any valid SuperCollider expression.
send_silent (expr)
Evaluate an expression without feedback from the post window.

Parameters:

  • expr Any valid SuperCollider expression.
eval (expr, cb)
Evaluate an expression and get the return value in lua.

Parameters:

  • expr Any valid SuperCollider expression.
  • cb A callback that will receive the return value as its first argument.

Usage:

    scnvim.eval('1 + 1', function(res)
     print(res)
    end)
start ()
Start sclang.
stop ()
Stop sclang.
recompile ()
Recompile class library.
is_running ()
Determine if a sclang process is active.

Returns:

    True if sclang is running otherwise false.
register_extension (ext)
Register an extension.

Parameters:

  • ext The extension to register.

Returns:

    The extension.
load_extension (name)
Load an extension. Should only be called after scnvim.setup.

Parameters:

  • name The extension to load.

Returns:

    The exported functions from the extension.

Usage:

    scnvim.load_extension('logger')
generated by LDoc 1.5.0 Last updated 2024-09-16 07:21:44