null-ls: package option

This commit is contained in:
Alexander Nortung 2023-01-17 21:59:14 +01:00
parent 097d95d9d7
commit ac8293d806

View file

@ -12,6 +12,12 @@ in
options.plugins.null-ls = { options.plugins.null-ls = {
enable = mkEnableOption "Enable null-ls"; enable = mkEnableOption "Enable null-ls";
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.null-ls-nvim;
description = "Plugin to use for null-ls";
};
debug = mkOption { debug = mkOption {
default = null; default = null;
type = with types; nullOr bool; type = with types; nullOr bool;
@ -38,7 +44,7 @@ in
}; };
in in
mkIf cfg.enable { mkIf cfg.enable {
extraPlugins = with pkgs.vimPlugins; [ null-ls-nvim ]; extraPlugins = [ cfg.package ];
extraConfigLua = '' extraConfigLua = ''
require("null-ls").setup(${helpers.toLuaObject options}) require("null-ls").setup(${helpers.toLuaObject options})