feat: add `viAlias` and `vimAlias` mkNeovimPkg options
parent
2903d288e2
commit
359462b075
11
README.md
11
README.md
|
|
@ -19,6 +19,7 @@ A [neovim] plugin and configuration management plugin, highly inspired by [lazy]
|
|||
- [`:Sloth` command](#sloth-command)
|
||||
- [`list` subcommand](#list-subcommand)
|
||||
- [`load` subcommand](#load-subcommand)
|
||||
- [`version` subcommand](#version-subcommand)
|
||||
- [API](#api)
|
||||
|
||||
<!-- TOC -->
|
||||
|
|
@ -91,6 +92,8 @@ Once installed, you can call the `sloth-flake.lib.mkNeovimPkg` to build your neo
|
|||
```nix
|
||||
sloth-flake.lib.mkNeovimPkg {
|
||||
inherit pkgs;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
runtime = {
|
||||
version = "0.1";
|
||||
src = sloth-flake.lib.sourcesWith ./. [
|
||||
|
|
@ -132,6 +135,8 @@ Here's a list of all accepted arguments
|
|||
| `runtime` | `{}` | Your Runtime configuration (see below) |
|
||||
| `dependencies` | `[]` | A list of your dependencies (see below) |
|
||||
| `dependenciesExtraArgs` | `{}` | Extra arguments to load your dependencies in other files |
|
||||
| `viAlias` | `false` | Wether to create a `vi` alias to run neovim |
|
||||
| `vimAlias` | `false` | Wether to create a `vim` alias to run neovim |
|
||||
|
||||
The Runtime configuration object accepts the following properties:
|
||||
|
||||
|
|
@ -231,6 +236,12 @@ Summary: Load lazy plugins.
|
|||
Usage: `Sloth load <plugin> [plugin [...]]`
|
||||
- `plugin`: a plugin to load
|
||||
|
||||
##### `version` subcommand
|
||||
|
||||
Summary: Return Sloth version
|
||||
|
||||
Usage: `Sloth version`
|
||||
|
||||
#### API
|
||||
|
||||
The lua API is not really defined yet. This documentation will be completed then.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
dependencies ? [],
|
||||
dependenciesExtraArgs ? {},
|
||||
runtime ? {},
|
||||
viAlias ? false,
|
||||
vimAlias ? false,
|
||||
...
|
||||
} @ config: let
|
||||
inherit (builtins) map;
|
||||
|
|
@ -42,6 +44,9 @@
|
|||
plugins = extractPlugins plugins;
|
||||
}
|
||||
// {luaRcContent = customRC;};
|
||||
pkg = pkgs.wrapNeovimUnstable package (removeAttrs neovimConfig ["manifestRc" "neovimRcContent"]);
|
||||
params =
|
||||
removeAttrs neovimConfig ["manifestRc" "neovimRcContent"]
|
||||
// {inherit viAlias vimAlias;};
|
||||
pkg = pkgs.wrapNeovimUnstable package params;
|
||||
in
|
||||
builtins.seq (types.mkNeovimPkgOptions config) pkg
|
||||
|
|
|
|||
|
|
@ -86,5 +86,11 @@
|
|||
|
||||
# Runtime configuration
|
||||
runtime = runtimeType;
|
||||
|
||||
# Create a vi alias
|
||||
viAlias = option bool;
|
||||
|
||||
# Create a vim alias
|
||||
vimAlias = option bool;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue