feat!: `init.lua` configuration is now a `mkNeovimPkg`'s option
BREAKING CHANGE: The init configuration has moved out of runtime configuration. It is now in the mkNeovimPkg confuguration.main
parent
815a099805
commit
b6630684fb
|
|
@ -185,6 +185,7 @@ Here's a list of all accepted arguments
|
|||
|-------------------------|-------------------------|----------------------------------------------------------------|
|
||||
| `pkgs` | N/A | The nixpkgs set. **REQUIRED** |
|
||||
| `package` | `pkgs.neovim-unwrapped` | The unwrapped neovim package to use |
|
||||
| `init` | `null` | The `init.lua` of your config (string or path)¹ |
|
||||
| `runtime` | `{}` | Your Runtime configuration (see below) |
|
||||
| `dependencies` | `[]` | A list of your dependencies (see below) |
|
||||
| `dependenciesExtraArgs` | `{}` | Extra arguments to load your dependencies in other files |
|
||||
|
|
@ -193,16 +194,15 @@ Here's a list of all accepted arguments
|
|||
| `vimdiffAlias` | `false` | Wether to create a `vimdiff` alias to run neovim in diff mode |
|
||||
| `nvimdiffAlias` | `false` | Wether to create a `nvimdiff` alias to run neovim in diff mode |
|
||||
|
||||
> ¹ If you give your own `init.lua` as string or path, you'll have to call `sloth-flake` lua plugin yourself. See more below.
|
||||
|
||||
The Runtime configuration object accepts the following properties:
|
||||
|
||||
| name | default | description |
|
||||
|-----------|---------|--------------------------------|
|
||||
| `version` | `null` | The version of your runtime |
|
||||
| `init` | `null` | The `init.lua` of your config¹ |
|
||||
| `src` | `null` | The content of your runtime |
|
||||
|
||||
> ¹ If you give your own `init.lua`, you'll have to call `sloth-flake` lua plugin yourself. See more below.
|
||||
|
||||
The dependencies is a list of element of either:
|
||||
- path: the path of the file to load other dependencies
|
||||
- package: a nix package of a neovim/vim plugin
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
dependencies ? [],
|
||||
dependenciesExtraArgs ? {},
|
||||
runtime ? null,
|
||||
init ? null,
|
||||
viAlias ? false,
|
||||
vimAlias ? false,
|
||||
vimdiffAlias ? false,
|
||||
|
|
@ -40,9 +41,9 @@
|
|||
|
||||
customRC = let
|
||||
rc =
|
||||
if isNull runtime || isNull runtime.init
|
||||
if isNull init
|
||||
then ../lua/default_init.lua
|
||||
else runtime.init;
|
||||
else init;
|
||||
in
|
||||
deps.textOrContent rc;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@ in rec {
|
|||
# The version of the runtime
|
||||
version = option string;
|
||||
|
||||
# The init configuration file
|
||||
init = option (either path string);
|
||||
|
||||
# The content of the runtime directory
|
||||
src = any;
|
||||
};
|
||||
|
|
@ -98,6 +95,9 @@ in rec {
|
|||
# Default is pkgs.neovim-unwrapped
|
||||
package = option drv;
|
||||
|
||||
# init.lua configuration
|
||||
init = option (either string path);
|
||||
|
||||
# An array of dependencies.
|
||||
dependencies = option (list dependency);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue