mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
22 lines
575 B
Nix
22 lines
575 B
Nix
{ config, lib, ... }:
|
|
let
|
|
noneLsBuiltins = import ../../generated/none-ls.nix;
|
|
mkSourcePlugin = import ./_mk-source-plugin.nix;
|
|
in
|
|
{
|
|
imports =
|
|
[ ./prettier.nix ]
|
|
++ (lib.flatten (
|
|
lib.mapAttrsToList (category: (lib.map (mkSourcePlugin category))) noneLsBuiltins
|
|
));
|
|
|
|
config =
|
|
let
|
|
cfg = config.plugins.none-ls;
|
|
gitsignsEnabled = cfg.sources.code_actions.gitsigns.enable;
|
|
in
|
|
lib.mkIf cfg.enable {
|
|
# Enable gitsigns if the gitsigns source is enabled
|
|
plugins.gitsigns.enable = lib.mkIf gitsignsEnabled true;
|
|
};
|
|
}
|