docs: example specs encourage type safety with ---@type LazySpec

This commit is contained in:
Mika Vilpas 2024-01-19 14:28:48 +02:00
commit 9d4381fab0

View file

@ -156,6 +156,7 @@ When `[2]` is `nil`, then the real mapping has to be created by the `config()` f
```lua ```lua
-- Example for neo-tree.nvim -- Example for neo-tree.nvim
---@type LazySpec
{ {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
keys = { keys = {
@ -196,6 +197,7 @@ version of plugins that support Semver.
<!-- spec:start --> <!-- spec:start -->
```lua ```lua
---@type LazySpec
return { return {
-- the colorscheme should be available when starting Neovim -- the colorscheme should be available when starting Neovim
{ {
@ -683,6 +685,7 @@ require("lazy").setup("plugins")
- `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **_(this file is optional)_** - `~/.config/nvim/lua/plugins.lua` or `~/.config/nvim/lua/plugins/init.lua` **_(this file is optional)_**
```lua ```lua
---@type LazySpec
return { return {
"folke/neodev.nvim", "folke/neodev.nvim",
"folke/which-key.nvim", "folke/which-key.nvim",