junegunn / vim-plug

:hibiscus: Minimalist Vim Plugin Manager
https://junegunn.github.io/vim-plug/
MIT License
34.22k stars 1.93k forks source link

Vim9 lambda syntax: how? #1298

Closed ubaldot closed 1 month ago

ubaldot commented 1 month ago

My .vimrc is Vim9-syntax, but I am having troubles with lambda functions.

For example:

Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }

should be:

Plug 'junegunn/fzf', { 'do': () => fzf#install() }

But it does not work:

E15: Invalid expression: ") => vimspectorpy#update()  })"
E116: Invalid arguments for function plug#
ubaldot commented 1 month ago

vim-plug is written is legacy-vim language, and what is specified as option is a dict. Hence, the lamdba definition shall follow the legacy format.