1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:30:04 +08:00

Scheme guile support (#3127)

This commit is contained in:
Jethro Cao 2019-10-06 17:50:25 +09:00 committed by Wang Shidong
parent a146c3ec5f
commit a5c99f70c0
2 changed files with 15 additions and 2 deletions

View File

@ -46,7 +46,7 @@ if !s:self.nvim_job && !s:self.vim_job
au! User SpaceVim_job_stdout nested call call(s:self.opts.on_stdout, s:self.job_argv)
au! User SpaceVim_job_stderr nested call call(s:self.opts.on_stderr, s:self.job_argv)
au! User SpaceVim_job_exit nested call call(s:self.opts.on_exit, s:self.job_argv)
augroup ENd
augroup END
endif
function! s:self.warn(...) abort

View File

@ -7,11 +7,24 @@
"=============================================================================
function! SpaceVim#layers#lang#scheme#config() abort
call SpaceVim#plugins#runner#reg_runner('scheme', 'echo | mit-scheme --quiet --load %s && echo')
if s:scheme_dialect ==# 'mit-scheme'
call SpaceVim#plugins#runner#reg_runner('scheme', 'echo | mit-scheme --quiet --load %s && echo')
elseif s:scheme_dialect ==# 'guile'
call SpaceVim#plugins#runner#reg_runner('scheme', 'echo | guile -q %s && echo')
else
try
call SpaceVim#plugins#runner#reg_runner('scheme', 'echo | ' . s:scheme_dialect . ' %s && echo')
catch /^Vim\%((\a\+)\)\=:E117/
endtry
endif
call SpaceVim#mapping#space#regesit_lang_mappings('scheme', function('s:language_specified_mappings'))
call SpaceVim#plugins#repl#reg('scheme', ['scheme', '--silent'])
endfunction
function! SpaceVim#layers#lang#scheme#set_variable(opt) abort
let s:scheme_dialect = get(a:opt, 'dialect', 'mit-scheme')
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'}