You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/lazy.nvim.txt
+57-22
Original file line number
Diff line number
Diff line change
@@ -109,28 +109,28 @@ It is recommended to run `:checkhealth lazy` after installation
109
109
110
110
PLUGIN SPEC *lazy.nvim-plugin-spec*
111
111
112
-
│ Property │ Type │ Description │
113
-
│[1] │string? │Short plugin url. Will be expanded using config.git.url_format │
114
-
│**dir** │string? │A directory pointing to a local plugin │
115
-
│**url** │string? │A custom git url where the plugin is hosted │
116
-
│**name** │string? │A custom name for the plugin used for the local plugin directory and as the display name │
117
-
│**dev** │boolean? │When true, a local plugin directory will be used instead. See config.dev │
118
-
│**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 │
119
-
│**enabled** │boolean? or fun():boolean │When false, or if the function returns false, then this plugin will not be used │
120
-
│**dependencies**│LazySpec[] │A list of plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise │
121
-
│**init** │fun(LazyPlugin) │init functions are always executed during startup │
122
-
│**config** │fun(LazyPlugin) │config is executed when the plugin loads │
123
-
│**build** │fun(LazyPlugin) │build is executed when a plugin is installed or updated │
124
-
│**branch** │string? │Branch of the repository │
125
-
│**tag** │string? │Tag of the repository │
126
-
│**commit** │string? │Commit of the repository │
127
-
│**version** │string? │Version to use from the repository. Full Semver <https://devhints.io/semver> ranges are supported │
128
-
│**pin** │boolean? │When true, this plugin will not be included in updates │
129
-
│**event** │string? or string[] │Lazy-load on event │
130
-
│**cmd** │string? or string[] │Lazy-load on command │
131
-
│**ft** │string? or string[] │Lazy-load on filetype │
132
-
│**keys** │string? or string[] │Lazy-load on key mapping │
133
-
│**module** │false? │Do not automatically load this lua module when it’s required somewhere │
112
+
│ Property │ Type │ Description │
113
+
│[1] │string? │Short plugin url. Will be expanded using config.git.url_format │
114
+
│**dir** │string? │A directory pointing to a local plugin │
115
+
│**url** │string? │A custom git url where the plugin is hosted │
116
+
│**name** │string? │A custom name for the plugin used for the local plugin directory and as the display name │
117
+
│**dev** │boolean? │When true, a local plugin directory will be used instead. See config.dev │
118
+
│**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 │
119
+
│**enabled** │boolean? or fun():boolean │When false, or if the function returns false, then this plugin will not be used │
120
+
│**dependencies**│LazySpec[] │A list of plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise │
121
+
│**init** │fun(LazyPlugin) │init functions are always executed during startup │
122
+
│**config** │fun(LazyPlugin) │config is executed when the plugin loads │
123
+
│**build** │fun(LazyPlugin) │build is executed when a plugin is installed or updated │
124
+
│**branch** │string? │Branch of the repository │
125
+
│**tag** │string? │Tag of the repository │
126
+
│**commit** │string? │Commit of the repository │
127
+
│**version** │string? │Version to use from the repository. Full Semver <https://devhints.io/semver> ranges are supported │
128
+
│**pin** │boolean? │When true, this plugin will not be included in updates │
129
+
│**event** │string? or string[] │Lazy-load on event │
130
+
│**cmd** │string? or string[] │Lazy-load on command │
131
+
│**ft** │string? or string[] │Lazy-load on filetype │
132
+
│**keys** │string? or string[] or LazyKeys[] │Lazy-load on key mapping │
133
+
│**module** │false? │Do not automatically load this lua module when it’s required somewhere │
134
134
135
135
136
136
LAZY LOADING ~
@@ -159,6 +159,41 @@ Plugins will be lazy-loaded when one of the following is `true`:
159
159
- `config.defaults.lazy == true`
160
160
161
161
162
+
*lazy.nvim-Lazy-Key-Mappings*
163
+
164
+
Lazy Key Mappings The `keys` property can be a `string` or
165
+
`string[]` for simple normal-mode
166
+
mappings, or it can be a `LazyKeys`
167
+
table with the following key-value
168
+
pairs:
169
+
170
+
171
+
172
+
- **[1]**: (`string`) lhs **_(required)_**
173
+
- **[2]**: (`string|fun()`) rhs **_(optional)_**
174
+
- **mode**: (`string|string[]`) mode **_(optional, defaults to `"n"`)_**
175
+
- any other option valid for `vim.keymap.set`
176
+
177
+
178
+
Key mappings will load the plugin the first time they get executed.
179
+
180
+
When `[2]` is `nil`, then the real mapping has to be created by the `config()`
0 commit comments