From a8fe63e4d5c08807d6c7d4d46c8adc8a0f88b0b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Dec 2022 09:33:10 +0000 Subject: [PATCH] chore(build): auto-generate vimdoc --- doc/lazy.nvim.txt | 79 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 6df82a9..c763f12 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -109,28 +109,28 @@ It is recommended to run `:checkhealth lazy` after installation PLUGIN SPEC *lazy.nvim-plugin-spec* -│ Property │ Type │ Description │ -│[1] │string? │Short plugin url. Will be expanded using config.git.url_format │ -│**dir** │string? │A directory pointing to a local plugin │ -│**url** │string? │A custom git url where the plugin is hosted │ -│**name** │string? │A custom name for the plugin used for the local plugin directory and as the display name │ -│**dev** │boolean? │When true, a local plugin directory will be used instead. See config.dev │ -│**lazy** │boolean? │When true, the plugin will only be loaded when needed. Lazy-loaded plugins are automatically loaded when their lua modules are required, or when one of the laz-loading handlers triggers │ -│**enabled** │boolean? or fun():boolean │When false, or if the function returns false, then this plugin will not be used │ -│**dependencies**│LazySpec[] │A list of plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise │ -│**init** │fun(LazyPlugin) │init functions are always executed during startup │ -│**config** │fun(LazyPlugin) │config is executed when the plugin loads │ -│**build** │fun(LazyPlugin) │build is executed when a plugin is installed or updated │ -│**branch** │string? │Branch of the repository │ -│**tag** │string? │Tag of the repository │ -│**commit** │string? │Commit of the repository │ -│**version** │string? │Version to use from the repository. Full Semver ranges are supported │ -│**pin** │boolean? │When true, this plugin will not be included in updates │ -│**event** │string? or string[] │Lazy-load on event │ -│**cmd** │string? or string[] │Lazy-load on command │ -│**ft** │string? or string[] │Lazy-load on filetype │ -│**keys** │string? or string[] │Lazy-load on key mapping │ -│**module** │false? │Do not automatically load this lua module when it’s required somewhere │ +│ Property │ Type │ Description │ +│[1] │string? │Short plugin url. Will be expanded using config.git.url_format │ +│**dir** │string? │A directory pointing to a local plugin │ +│**url** │string? │A custom git url where the plugin is hosted │ +│**name** │string? │A custom name for the plugin used for the local plugin directory and as the display name │ +│**dev** │boolean? │When true, a local plugin directory will be used instead. See config.dev │ +│**lazy** │boolean? │When true, the plugin will only be loaded when needed. Lazy-loaded plugins are automatically loaded when their lua modules are required, or when one of the laz-loading handlers triggers │ +│**enabled** │boolean? or fun():boolean │When false, or if the function returns false, then this plugin will not be used │ +│**dependencies**│LazySpec[] │A list of plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise │ +│**init** │fun(LazyPlugin) │init functions are always executed during startup │ +│**config** │fun(LazyPlugin) │config is executed when the plugin loads │ +│**build** │fun(LazyPlugin) │build is executed when a plugin is installed or updated │ +│**branch** │string? │Branch of the repository │ +│**tag** │string? │Tag of the repository │ +│**commit** │string? │Commit of the repository │ +│**version** │string? │Version to use from the repository. Full Semver ranges are supported │ +│**pin** │boolean? │When true, this plugin will not be included in updates │ +│**event** │string? or string[] │Lazy-load on event │ +│**cmd** │string? or string[] │Lazy-load on command │ +│**ft** │string? or string[] │Lazy-load on filetype │ +│**keys** │string? or string[] or LazyKeys[] │Lazy-load on key mapping │ +│**module** │false? │Do not automatically load this lua module when it’s required somewhere │ LAZY LOADING ~ @@ -159,6 +159,41 @@ Plugins will be lazy-loaded when one of the following is `true`: - `config.defaults.lazy == true` + *lazy.nvim-Lazy-Key-Mappings* + +Lazy Key Mappings The `keys` property can be a `string` or + `string[]` for simple normal-mode + mappings, or it can be a `LazyKeys` + table with the following key-value + pairs: + + + +- **[1]**: (`string`) lhs **_(required)_** +- **[2]**: (`string|fun()`) rhs **_(optional)_** +- **mode**: (`string|string[]`) mode **_(optional, defaults to `"n"`)_** +- any other option valid for `vim.keymap.set` + + +Key mappings will load the plugin the first time they get executed. + +When `[2]` is `nil`, then the real mapping has to be created by the `config()` +function. + +>lua + -- Example for neo-tree.nvim + { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "ft", "Neotree toggle", desc = "NeoTree" }, + }, + config = function() + require("neo-tree").setup() + end, + } +< + + VERSIONING ~ If you want to install a specific revision of a plugin, you can use `commit`,