2023-02-20 11:42:13 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2022-11-15 10:14:43 +00:00
|
|
|
cfg = config.plugins.trouble;
|
2023-02-20 11:42:13 +01:00
|
|
|
helpers = import ../helpers.nix {inherit lib;};
|
2022-11-15 10:14:43 +00:00
|
|
|
in
|
2023-02-20 11:42:13 +01:00
|
|
|
with lib;
|
|
|
|
# with helpers;
|
|
|
|
{
|
|
|
|
options.plugins.trouble = {
|
|
|
|
enable = mkEnableOption "trouble.nvim";
|
2022-11-15 10:14:43 +00:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
package = helpers.mkPackageOption "trouble-nvim" pkgs.vimPlugins.trouble-nvim;
|
2023-01-19 10:45:15 +00:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
position = helpers.mkNullOrOption (types.enum ["top" "left" "right" "bottom"]) "Position of the list";
|
|
|
|
height = helpers.mkNullOrOption types.int "Height of the trouble list when position is top or bottom";
|
|
|
|
width = helpers.mkNullOrOption types.int "Width of the trouble list when position is left or right";
|
|
|
|
icons = helpers.mkNullOrOption types.bool "Use devicons for filenames";
|
|
|
|
};
|
2022-11-15 10:14:43 +00:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
extraPlugins = with pkgs.vimPlugins; [
|
|
|
|
cfg.package
|
|
|
|
nvim-web-devicons
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|