taoso / phpfold.vim

vim fold plugin according php ast
10 stars 2 forks source link

Get errors in neovim. #1

Closed wsdjeg closed 7 years ago

wsdjeg commented 7 years ago

2016/12/12

5529 merged Vim's support for "partial functions" which made Nvim more strict about when the implicit self variable is available. Functions that reference self (which is common with job callbacks) must either be declared as dict functions:

function! s:on_stdout(id, data, event) dict abort

or as part of the job options dictionary:

let s:opts = { ... }

function! s:opts.on_stdout(id, data, event) abort

Job callbacks also must have at least 3 parameters now. See https://github.com/neovim/neovim/issues/5763#issuecomment-266722407

phpfold.vim/ftplugin/php_phpfold.vim
13:function! s:doFold(status, response)
24:     let job = job_start(cmd, {'out_cb': function('s:doFold')})
26:     let job = jobstart(cmd, {'on_stdout': function('s:doFold')})

repos/github.com/lvht/phpfold.vim/ftplugin/php_phpfold.vim
13:function! s:doFold(status, response)
24:     let job = job_start(cmd, {'out_cb': function('s:doFold')})
26:     let job = jobstart(cmd, {'on_stdout': function('s:doFold')})

这几处需要修改参数个数, neovim 默认callback是需要三个参数

przepompownia commented 7 years ago

See #2