iamcco / iamcco/markdown-preview.nvim
Convert vim-plug installation to Lua
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 411
- PR merge metrics
- No merged PRs in 30d
Description
The `vim-plug` VimScript instructions to install MarkdownPreview are as follows:
```
local vim = vim
local Plug = vim.fn['plug#']
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
vim.call('plug#end')
```
I'm looking for help on how I can convert the line beginning with `Plug ...` into Lua. This particular line errors out, since Lua does not recognize the data between the curly braces.
The installation guide only shows `.lua` examples for Packer, and I have seen no other discussion after a cursory issue search.
I have tried the following, changing `do` and `for` into `['do']` and `['for']` respectively since both are keywords in Lua, but the same error still surfaces. I suspect the `->` operator might need special handling.
```
Plug 'iamcco/markdown-preview.nvim', { ['do'] = { -> 'mkdp#util#install()' }, ['for'] = {'markdown', 'vim-plug'}}
```
Any help is appreciated!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.