2024-07-11 19:07:54 +01:00
|
|
|
{ config, lib, ... }:
|
2023-12-02 17:58:49 +01:00
|
|
|
let
|
2024-07-05 18:59:04 +02:00
|
|
|
noneLsBuiltins = import ../../generated/none-ls.nix;
|
2024-07-11 19:07:54 +01:00
|
|
|
mkSourcePlugin = import ./_mk-source-plugin.nix;
|
2023-02-20 11:42:13 +01:00
|
|
|
in
|
|
|
|
{
|
2024-07-11 19:07:54 +01:00
|
|
|
imports =
|
|
|
|
[ ./prettier.nix ]
|
|
|
|
++ (lib.flatten (
|
|
|
|
lib.mapAttrsToList (category: (lib.map (mkSourcePlugin category))) noneLsBuiltins
|
|
|
|
));
|
2022-12-30 22:04:43 +01:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
config =
|
|
|
|
let
|
2023-10-13 11:43:42 -06:00
|
|
|
cfg = config.plugins.none-ls;
|
2023-05-21 17:19:38 +02:00
|
|
|
gitsignsEnabled = cfg.sources.code_actions.gitsigns.enable;
|
2023-02-20 11:42:13 +01:00
|
|
|
in
|
2024-07-05 18:59:04 +02:00
|
|
|
lib.mkIf cfg.enable {
|
2024-07-11 19:07:54 +01:00
|
|
|
# Enable gitsigns if the gitsigns source is enabled
|
2024-07-05 18:59:04 +02:00
|
|
|
plugins.gitsigns.enable = lib.mkIf gitsignsEnabled true;
|
2022-12-30 22:04:43 +01:00
|
|
|
};
|
2022-08-05 12:08:19 +00:00
|
|
|
}
|