parent
edab526dd0
commit
75bca38fb1
28
README.md
28
README.md
|
|
@ -18,6 +18,7 @@ A [neovim] plugin and configuration management plugin, highly inspired by [lazy]
|
||||||
- [Using your own `init.lua`](#using-your-own-initlua)
|
- [Using your own `init.lua`](#using-your-own-initlua)
|
||||||
- [`:Sloth` command](#sloth-command)
|
- [`:Sloth` command](#sloth-command)
|
||||||
- [`list` subcommand](#list-subcommand)
|
- [`list` subcommand](#list-subcommand)
|
||||||
|
- [`load` subcommand](#load-subcommand)
|
||||||
- [API](#api)
|
- [API](#api)
|
||||||
|
|
||||||
<!-- TOC -->
|
<!-- TOC -->
|
||||||
|
|
@ -45,6 +46,7 @@ A [neovim] plugin and configuration management plugin, highly inspired by [lazy]
|
||||||
- [ ] on event
|
- [ ] on event
|
||||||
- [ ] on keybinding
|
- [ ] on keybinding
|
||||||
- [X] load plugins in order (via plugin `dependencies` property)
|
- [X] load plugins in order (via plugin `dependencies` property)
|
||||||
|
- [X] Have a `:Sloth` command to load or query your plugins
|
||||||
- [ ] Generate spell files on build (maybe)
|
- [ ] Generate spell files on build (maybe)
|
||||||
|
|
||||||
## SemVer
|
## SemVer
|
||||||
|
|
@ -205,23 +207,29 @@ sloth_flake.setup {
|
||||||
#### `:Sloth` command
|
#### `:Sloth` command
|
||||||
|
|
||||||
`sloth-flake` give a `Sloth` command that you can call to gather some
|
`sloth-flake` give a `Sloth` command that you can call to gather some
|
||||||
informations about your plugins.
|
informations about or load your plugins.
|
||||||
|
|
||||||
```vim
|
Usage: `Sloth [command] [args...]`
|
||||||
Sloth [command] [args...]
|
|
||||||
```
|
|
||||||
|
|
||||||
If no arguments are given, the `Sloth` command will call the `list` subcommand.
|
If no arguments are given, the `Sloth` command will call the `list` subcommand.
|
||||||
|
|
||||||
##### `list` subcommand
|
##### `list` subcommand
|
||||||
|
|
||||||
```vim
|
Summary: List plugins.
|
||||||
Sloth list [filter]
|
|
||||||
```
|
Usage: `Sloth list [filter]`
|
||||||
|
|
||||||
- `filter`: filter the list of plugins.
|
- `filter`: filter the list of plugins.
|
||||||
- `"all"`: list all declared plugins. Same as if no filter is given.
|
- `all`: list all declared plugins. Same as if no filter is given.
|
||||||
- `"loaded"`: list only loaded plugins.
|
- `loaded`: list only loaded plugins.
|
||||||
- `"notloaded"`: list only not loaded plugins.
|
- `notloaded`: list only not loaded plugins.
|
||||||
|
|
||||||
|
##### `load` subcommand
|
||||||
|
|
||||||
|
Summary: Load lazy plugins.
|
||||||
|
|
||||||
|
Usage: `Sloth load <plugin> [plugin [...]]`
|
||||||
|
- `plugin`: a plugin to load
|
||||||
|
|
||||||
#### API
|
#### API
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,16 @@ local commands = {
|
||||||
print(string.format("- %s", dep))
|
print(string.format("- %s", dep))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
load = function(plugins)
|
||||||
|
if #plugins == 0 then
|
||||||
|
vim_error("You should at least give a plugin to load!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for _, plugin in ipairs(plugins) do
|
||||||
|
M.load(plugin)
|
||||||
|
end
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
function sloth_cmd(param)
|
function sloth_cmd(param)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue