"============================================================================= " supercollider.vim --- supercollider language support in SpaceVim " Copyright (c) 2016-2023 Wang Shidong & Contributors " Author: Wang Shidong < wsdjeg@outlook.com > " URL: https://spacevim.org " License: GPLv3 "============================================================================= function! SpaceVim#layers#lang#supercollider#plugins() abort let plugins = [] call add(plugins, ['wsdjeg/vim-supercollider', { 'merged' : 0}]) return plugins endfunction function! SpaceVim#layers#lang#supercollider#config() abort " call SpaceVim#plugins#repl#reg('supercollider', 'supercollider') " call SpaceVim#plugins#runner#reg_runner('supercollider', 'supercollider %s') " call SpaceVim#mapping#space#regesit_lang_mappings('supercollider', function('s:language_specified_mappings')) endfunction function! s:language_specified_mappings() abort call SpaceVim#mapping#space#langSPC('nmap', ['l','r'], 'call SpaceVim#plugins#runner#open()', 'execute current file', 1) let g:_spacevim_mappings_space.l.s = {'name' : '+Send'} call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'i'], \ 'call SpaceVim#plugins#repl#start("supercollider")', \ 'start REPL process', 1) call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'l'], \ 'call SpaceVim#plugins#repl#send("line")', \ 'send line and keep code buffer focused', 1) call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 'b'], \ 'call SpaceVim#plugins#repl#send("buffer")', \ 'send buffer and keep code buffer focused', 1) call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 's'], \ 'call SpaceVim#plugins#repl#send("selection")', \ 'send selection and keep code buffer focused', 1) " key bindings " " au Filetype supercollider nnoremap :call SClang_block() " au Filetype supercollider inoremap :call SClang_block()a " au Filetype supercollider vnoremap :call SClang_send() " " au Filetype supercollider vnoremap :call SClang_line() " au Filetype supercollider nnoremap :call SClang_line() " au Filetype supercollider inoremap :call SClang_line()a " " au Filetype supercollider nnoremap :call SClangHardstop() " " au Filetype supercollider nnoremap sk :SClangRecompile " au Filetype supercollider nnoremap K :call SChelp(expand('')) " au Filetype supercollider inoremap :call SCfindArgs()a " au Filetype supercollider nnoremap :call SCfindArgs() " au Filetype supercollider vnoremap :call SCfindArgsFromSelection() " " DEPRECATED " au Filetype supercollider nnoremap sd yiw :call SChelp(""") " au Filetype supercollider nnoremap sj yiw :call SCdef(""") " au Filetype supercollider nnoremap si yiw :call SCimplementation(""") " au Filetype supercollider nnoremap sr yiw :call SCreference(""") endfunction function! SpaceVim#layers#lang#supercollider#health() abort call SpaceVim#layers#lang#supercollider#plugins() call SpaceVim#layers#lang#supercollider#config() return 1 endfunction