supercollider-h4x-nvim icon indicating copy to clipboard operation
supercollider-h4x-nvim copied to clipboard

Neovim plugin for SuperCollider hack(er)s

Table of Contents generated with DocToc

  • supercollider-h4x-nvim
  • Requirements
    • Dependencies
    • Install
      • packer
      • vim-plug
    • See also
  • Available commands
    • Plugins / extensions
      • SCNewPlugin
      • SCNewQuark
    • Help file development
      • SCHelpWatch
      • SCGetHelpWatch
    • Help file navigation / search
      • SCExternalHelpOpen
      • SCExternalHelpSearch
    • File loading
      • SCLoad
      • SCLoadRel
      • SCLoadMain
    • Gui stuff
      • SCServerGui
      • SCServerMeter
      • SCServerPlotTree
      • SCServerScope
    • Code generation
      • SCGeneratePattern
      • SCPasteNdef
  • Options

supercollider-h4x-nvim

SuperCollider hacks for nvim written in lean Lua

These make use of a range of command line tools in conjunction with NeoVim's built in terminal to create a bunch of useful convenience functions and features for working with SuperCollider code as well as doing development work for SuperCollider (including help files, cpp code and plugins).

This plugin is meant to be a companion to David Grantrom's scnvim plugin

Requirements

Nvim >= 0.5

Dependencies

Run :checkhealth to see if you fullfill the depencies.

Install

packer

use { 'madskjeldgaard/supercollider-h4x-nvim',
	config = function()
			require'supercollider-h4x'.setup()
	end,
	after = {'scnvim'},
	requires = {
		'davidgranstrom/scnvim'
	}
}

vim-plug

To install using vim-plug

  1. Add this to your init.vim / .vimrc: Plug 'madskjeldgaard/supercollider-h4x-nvim'
  2. Open Vim and run the command :PlugInstall

And then somewhere in your init.vim:

autocmd filetype supercollider,scnvim,scdoc,supercollider.help lua require'supercollider-h4x'.setup()

See also

Available commands

Plugins / extensions

SCNewPlugin

new plugin

:SCNewPlugin

Create a plugin project using this cookiecutter template

This will open up a terminal with a questionnaire. Answering the questions will generate and populate a new plugin project.

Requires cookiecutter

SCNewQuark

new quark

:SCNewQuark

Create a Quark project using this cookiecutter template

This will open up a terminal with a questionnaire. Answering the questions will generate and populate a new quark project.

Requires cookiecutter

Help file development

SCHelpWatch

schelp-watch

:SCHelpWatch

Run schelp-watch, a little helper tool that runs the help docs you are working on in a browser and recompiles it every time you make a change.

See schelp-watch for dependencies.

SCGetHelpWatch

:SCGetHelpWatch

Help file navigation / search

SCExternalHelpOpen

:SCExternalHelpOpen

Open external QT help browser page for class. Eg: :SCExternalHelpOpen SinOsc

SCExternalHelpSearch

:SCExternalHelpSearch Open external QT help browser search page

File loading

SCLoad

:SCLoad <file>

Load in SuperCollider

SCLoadRel

:SCLoadRel <file>

Relatively load in SuperCollider

SCLoadMain

:SCLoadMain

Load "main.scd" from root of current dir

Gui stuff

SCServerGui

:SCServerGui

Open server gui

SCServerMeter

:SCServerMeter

Open server meter

SCServerPlotTree

:SCServerPlotTree

Open server plot tree

SCServerScope

:SCServerScope

Open server scope

Code generation

SCGeneratePattern

pattern inserter code generator in action

:SCGeneratePattern synthdef_name

This will generate a Pbind with key/value pairs for all of a Synthdef's arguments and insert it into a text document.

SCPasteNdef

auto insert ndef's presets

:SCPasteNdef ndef_name

This will take all current parameter values from an Ndef and paste them into the buffer to be later reused as a preset or whatever.

Options

Options may be defined in either vimscript or lua. Here is how to do it in Lua:

-- Option: Change the prompt used for SCPrompt
vim.g.sc_prompt = "sch4x> "

-- Option: path to supercollider development source code for compiling plugins
vim.g.sc_source_code = "$HOME/supercollider"

-- Option: Where to put a newly generated quark
vim.g.sc_quark_path = "$HOME/.local/share/SuperCollider/Extensions"

-- Option: Where to put a newly generated plugin
vim.g.sc_plugin_dir = "$HOME/.local/share/SuperCollider/Extensions"

-- Option: Set custom urls for cookiecutter recipes (if you have a nice fork or something)
vim.g.sc_plugin_recipe = "https://github.com/supercollider/cookiecutter-supercollider-plugin"
vim.g.sc_quark_recipe = "https://github.com/madskjeldgaard/cookiecutter-quark"