Table of Contents generated with DocToc
- supercollider-h4x-nvim
- Requirements
- Available commands
- Options
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
Nvim >= 0.5
Run :checkhealth
to see if you fullfill the depencies.
use { 'madskjeldgaard/supercollider-h4x-nvim',
config = function()
require'supercollider-h4x'.setup()
end,
after = {'scnvim'},
requires = {
'davidgranstrom/scnvim'
}
}
To install using vim-plug
- Add this to your init.vim / .vimrc:
Plug 'madskjeldgaard/supercollider-h4x-nvim'
- 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()
- scnvim / scvim
- fzf-sc - Fuzzy searcher
- vim-scdoc-snippets (for UltiSnips)
- lua-supercollider-snippets (for snippets.nvim)
: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
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
: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
:SCExternalHelpOpen
Open external QT help browser page for class. Eg: :SCExternalHelpOpen SinOsc
:SCExternalHelpSearch
Open external QT help browser search page
:SCLoad <file>
Load in SuperCollider
:SCLoadRel <file>
Relatively load in SuperCollider
:SCLoadMain
Load "main.scd" from root of current dir
:SCServerGui
Open server gui
:SCServerMeter
Open server meter
:SCServerPlotTree
Open server plot tree
:SCServerScope
Open server scope
: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 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 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"