mirror of https://github.com/folke/lazy.nvim.git
style: fix some typo (#1496)
This commit is contained in:
parent
b0ba3f9399
commit
f39c79fcb1
10
README.md
10
README.md
|
@ -81,7 +81,7 @@ require("lazy").setup({
|
|||
## 🔌 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 |
|
||||
|
@ -95,7 +95,7 @@ require("lazy").setup({
|
|||
| **opts** | `table` or `fun(LazyPlugin, opts:table)` | `opts` should be a table (will be merged with parent specs), return a table (replaces parent specs) or should change a table. The table will be passed to the `Plugin.config()` function. Setting this value will imply `Plugin.config()` |
|
||||
| **config** | `fun(LazyPlugin, opts:table)` or `true` | `config` is executed when the plugin loads. The default implementation will automatically run `require(MAIN).setup(opts)` if `opts` or `config = true` is set. Lazy uses several heuristics to determine the plugin's `MAIN` module automatically based on the plugin's **name**. See also `opts`. To use the default implementation without `opts` set `config` to `true`. |
|
||||
| **main** | `string?` | You can specify the `main` module to use for `config()` and `opts()`, in case it can not be determined automatically. See `config()` |
|
||||
| **build** | `fun(LazyPlugin)` or `string` or a list of build commands | `build` is executed when a plugin is installed or updated. Before running `build`, a plugin is first loaded. If it's a string it will be ran as a shell command. When prefixed with `:` it is a Neovim command. You can also specify a list to executed multiple build commands. Some plugins provide their own `build.lua` which is automatically used by lazy. So no need to specify a build step for those plugins. |
|
||||
| **build** | `fun(LazyPlugin)` or `string` or a list of build commands | `build` is executed when a plugin is installed or updated. Before running `build`, a plugin is first loaded. If it's a string it will be run as a shell command. When prefixed with `:` it is a Neovim command. You can also specify a list to executed multiple build commands. Some plugins provide their own `build.lua` which is automatically used by lazy. So no need to specify a build step for those plugins. |
|
||||
| **branch** | `string?` | Branch of the repository |
|
||||
| **tag** | `string?` | Tag of the repository |
|
||||
| **commit** | `string?` | Commit of the repository |
|
||||
|
@ -279,8 +279,8 @@ return {
|
|||
-- you can use a custom url to fetch a plugin
|
||||
{ url = "git@github.com:folke/noice.nvim.git" },
|
||||
|
||||
-- local plugins can also be configure with the dev option.
|
||||
-- This will use {config.dev.path}/noice.nvim/ instead of fetching it from Github
|
||||
-- local plugins can also be configured with the dev option.
|
||||
-- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub
|
||||
-- With the dev option, you can easily switch between the local and installed version of a plugin
|
||||
{ "folke/noice.nvim", dev = true },
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ Stats API (`require("lazy").stats()`):
|
|||
{
|
||||
-- startuptime in milliseconds till UIEnter
|
||||
startuptime = 0,
|
||||
-- when true, startuptime is the accurate cputime for the Neovim process. (Linux & Macos)
|
||||
-- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS)
|
||||
-- this is more accurate than `nvim --startuptime`, and as such will be slightly higher
|
||||
-- when false, startuptime is calculated based on a delta with a timestamp when lazy started.
|
||||
real_cputime = false,
|
||||
|
|
4
TODO.md
4
TODO.md
|
@ -51,7 +51,7 @@
|
|||
|
||||
- [ ] add support to specify `engines`, `os` and `cpu` like in `package.json`
|
||||
- [ ] semver merging. Should check if two or more semver ranges are compatible and calculate the union range
|
||||
- default semver merging strategy: if no version matches all, then use highest version?
|
||||
- default semver merging strategy: if no version matches all, then use the highest version?
|
||||
- [ ] package meta index (package.lua cache for all packages)
|
||||
|
||||
- [x] document highlight groups
|
||||
|
@ -65,7 +65,7 @@
|
|||
Maybe a quick, "for example, if you have a lua file
|
||||
`~/.config/nvim/lua/config/plugins.lua` that returns a table" or something it'd
|
||||
remove most question marks I think.
|
||||
- [x] When autoinstalling the plugins the cursor isn't focused on the floating
|
||||
- [x] When auto-installing the plugins the cursor isn't focused on the floating
|
||||
window, but on the non-floating window in the background.
|
||||
- [x] Doing `:Lazy clean` doesn't show which plugins were removed.
|
||||
- [x] Shouldn't the "Versioning" section be in the "Lockfile" chapter?
|
||||
|
|
|
@ -8,7 +8,7 @@ local M = {}
|
|||
---@class ModuleFindOpts
|
||||
---@field all? boolean Search for all matches (defaults to `false`)
|
||||
---@field rtp? boolean Search for modname in the runtime path (defaults to `true`)
|
||||
---@field patterns? string[] Paterns to use (defaults to `{"/init.lua", ".lua"}`)
|
||||
---@field patterns? string[] Patterns to use (defaults to `{"/init.lua", ".lua"}`)
|
||||
---@field paths? string[] Extra paths to search for modname
|
||||
|
||||
---@class ModuleInfo
|
||||
|
@ -474,7 +474,7 @@ function Loader.lsmod(path)
|
|||
return Loader._indexed[path]
|
||||
end
|
||||
|
||||
--- Debug function that wrapps all loaders and tracks stats
|
||||
--- Debug function that wraps all loaders and tracks stats
|
||||
---@private
|
||||
function M._profile_loaders()
|
||||
for l, loader in pairs(package.loaders) do
|
||||
|
|
|
@ -117,7 +117,7 @@ function Spec:add(plugin, results)
|
|||
dir = dir_dev
|
||||
end
|
||||
elseif plugin.dev == false then
|
||||
-- explicitely select the default path
|
||||
-- explicitly select the default path
|
||||
dir = Config.options.root .. "/" .. plugin.name
|
||||
end
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ return {
|
|||
-- you can use a custom url to fetch a plugin
|
||||
{ url = "git@github.com:folke/noice.nvim.git" },
|
||||
|
||||
-- local plugins can also be configure with the dev option.
|
||||
-- This will use {config.dev.path}/noice.nvim/ instead of fetching it from Github
|
||||
-- local plugins can also be configured with the dev option.
|
||||
-- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub
|
||||
-- With the dev option, you can easily switch between the local and installed version of a plugin
|
||||
{ "folke/noice.nvim", dev = true },
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ local M = {}
|
|||
M._stats = {
|
||||
-- startuptime in milliseconds till UIEnter
|
||||
startuptime = 0,
|
||||
-- when true, startuptime is the accurate cputime for the Neovim process. (Linux & Macos)
|
||||
-- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS)
|
||||
-- this is more accurate than `nvim --startuptime`, and as such will be slightly higher
|
||||
-- when false, startuptime is calculated based on a delta with a timestamp when lazy started.
|
||||
real_cputime = false,
|
||||
|
|
Loading…
Reference in New Issue