ruby.vim 494 B

1234567891011121314151617
  1. if exists('g:loaded_ruby_provider')
  2. finish
  3. endif
  4. function! provider#ruby#Require(host) abort
  5. return v:lua.vim.provider.ruby.require(a:host)
  6. endfunction
  7. function! provider#ruby#Call(method, args) abort
  8. return v:lua.vim.provider.ruby.call(a:method, a:args)
  9. endfunction
  10. let s:prog = v:lua.vim.provider.ruby.detect()
  11. let g:loaded_ruby_provider = empty(s:prog) ? 1 : 2
  12. let s:plugin_path = expand('<sfile>:p:h') . '/script_host.rb'
  13. call v:lua.require'vim.provider.ruby'.start(s:plugin_path)