mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
22 lines
424 B
Nix
22 lines
424 B
Nix
{
|
|
name,
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
options = {
|
|
plugin = lib.mkOption {
|
|
type = lib.types.package;
|
|
description = "A derivation with the content of the file in it";
|
|
readOnly = true;
|
|
internal = true;
|
|
};
|
|
};
|
|
config = {
|
|
path = name;
|
|
type = lib.mkDefault (if lib.hasSuffix ".vim" name then "vim" else "lua");
|
|
plugin = pkgs.writeTextDir config.path config.content;
|
|
};
|
|
}
|