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** |
|
| `pkgs` | N/A | The nixpkgs set. **REQUIRED** |
|
||||||
| `package` | `pkgs.neovim-unwrapped` | The unwrapped neovim package to use |
|
| `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) |
|
| `runtime` | `{}` | Your Runtime configuration (see below) |
|
||||||
| `dependencies` | `[]` | A list of your dependencies (see below) |
|
| `dependencies` | `[]` | A list of your dependencies (see below) |
|
||||||
| `dependenciesExtraArgs` | `{}` | Extra arguments to load your dependencies in other files |
|
| `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 |
|
| `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 |
|
| `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:
|
The Runtime configuration object accepts the following properties:
|
||||||
|
|
||||||
| name | default | description |
|
| name | default | description |
|
||||||
|-----------|---------|--------------------------------|
|
|-----------|---------|--------------------------------|
|
||||||
| `version` | `null` | The version of your runtime |
|
| `version` | `null` | The version of your runtime |
|
||||||
| `init` | `null` | The `init.lua` of your config¹ |
|
|
||||||
| `src` | `null` | The content of your runtime |
|
| `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:
|
The dependencies is a list of element of either:
|
||||||
- path: the path of the file to load other dependencies
|
- path: the path of the file to load other dependencies
|
||||||
- package: a nix package of a neovim/vim plugin
|
- package: a nix package of a neovim/vim plugin
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
dependencies ? [],
|
dependencies ? [],
|
||||||
dependenciesExtraArgs ? {},
|
dependenciesExtraArgs ? {},
|
||||||
runtime ? null,
|
runtime ? null,
|
||||||
|
init ? null,
|
||||||
viAlias ? false,
|
viAlias ? false,
|
||||||
vimAlias ? false,
|
vimAlias ? false,
|
||||||
vimdiffAlias ? false,
|
vimdiffAlias ? false,
|
||||||
|
|
@ -40,9 +41,9 @@
|
||||||
|
|
||||||
customRC = let
|
customRC = let
|
||||||
rc =
|
rc =
|
||||||
if isNull runtime || isNull runtime.init
|
if isNull init
|
||||||
then ../lua/default_init.lua
|
then ../lua/default_init.lua
|
||||||
else runtime.init;
|
else init;
|
||||||
in
|
in
|
||||||
deps.textOrContent rc;
|
deps.textOrContent rc;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,6 @@ in rec {
|
||||||
# The version of the runtime
|
# The version of the runtime
|
||||||
version = option string;
|
version = option string;
|
||||||
|
|
||||||
# The init configuration file
|
|
||||||
init = option (either path string);
|
|
||||||
|
|
||||||
# The content of the runtime directory
|
# The content of the runtime directory
|
||||||
src = any;
|
src = any;
|
||||||
};
|
};
|
||||||
|
|
@ -98,6 +95,9 @@ in rec {
|
||||||
# Default is pkgs.neovim-unwrapped
|
# Default is pkgs.neovim-unwrapped
|
||||||
package = option drv;
|
package = option drv;
|
||||||
|
|
||||||
|
# init.lua configuration
|
||||||
|
init = option (either string path);
|
||||||
|
|
||||||
# An array of dependencies.
|
# An array of dependencies.
|
||||||
dependencies = option (list dependency);
|
dependencies = option (list dependency);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue