coc-api-vim-source with Vim9 :def
functions
#5263
Closed
atitcreate
started this conversation in
General
Replies: 2 comments 2 replies
-
I've made a fix for it. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Added support for vim9script module 78c7f47 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The example in coc-api.txt
can also be written as:
Pitfall(fixed in ef591cb)If you use the optional function
on_complete
, you have to return a value to work aroundVim(let):E1031: Cannot use void value on api "call_function"
shown in:CocOpenLog
The api
call_function
in the log seems to bes:funcs.call_function
inautoload/coc/api.vim
, whichreturn call(a:method, a:args)
, and unlike:function
which implicitly returns0
,:def
implicitly returnsvoid
(without a return value), causingE1031
Limitation(resolved in 78c7f47)Vim9 script style autoload function is not supported
As function names in Vim9 script must start with a capitial, and coc-api-vim-source only recognizes function names starting with a lowercase letter.
Beta Was this translation helpful? Give feedback.
All reactions