如何使用惰性插件管理器配置 vim-perl 插件,使其像 vim-plug 一样运行“do”?

问题描述 投票:0回答:1

我的 lua 文件中有这个并且它可以工作:

{
  "vim-perl/vim-perl",
  lazy = true,
  ft = "perl",
},

vim-perl 插件 显示了使用 vim-plug 时的示例:

call plug#begin('~/.vim/plugged')

Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }

call plug#end()

如何使用惰性 vim 插件管理器实现“do”命令?

plugins neovim
1个回答
0
投票

使用

lazy.vim
,您可以为插件添加
build
函数,该函数在安装或更新插件时执行。有关详细信息,请参阅
lazy.vim
文档

{
  "vim-perl/vim-perl",
  lazy = true,
  ft = "perl",
  build = "make clean carp dancer highlight-all-pragmas moose test-more try-tiny",
},
© www.soinside.com 2019 - 2024. All rights reserved.