iamcco / iamcco/markdown-preview.nvim

feat request: support for lazy.nvim opts{} table

Open
#705 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

Hi together,
are you planning to support the lazy.nvim opts{} table to give users the chance of following the [best practice](https://lazy.folke.io/developers#best-practices) to not call setup({}) in a config() function?

It should be easy to implement, because lazy automatically calls the setup function and merges the opts table into it, if one exists.
I would offer to implement these changes myself via PR, but only if you are not against it.

This error is thrown right now when using opts{}:
```txt
Lua module not found for config of markdown-preview.nvim. Please use a `config()` function instead
```

```lua
return {
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function()
vim.fn["mkdp#util#install"]()
end,
opts = {
mkdp_auto_start = 1,
},
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.