mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 19:24:34 +02:00
plugins/none-ls: switch to mkNeovimPlugin
This commit is contained in:
parent
cb9ee70e8b
commit
ca8ac5f8e4
4 changed files with 479 additions and 300 deletions
|
@ -317,16 +317,18 @@ in
|
|||
-> [${concatStringsSep ", " uselesslyDeclaredToolNames}]
|
||||
'');
|
||||
|
||||
plugins.none-ls.sourcesItems = builtins.map (
|
||||
source:
|
||||
let
|
||||
sourceItem = "${source.sourceType}.${source.sourceName}";
|
||||
withArgs = if source.withArgs == null then sourceItem else "${sourceItem}.with(${source.withArgs})";
|
||||
in
|
||||
helpers.mkRaw ''
|
||||
require("null-ls").builtins.${withArgs}
|
||||
''
|
||||
) enabledSources;
|
||||
plugins.none-ls.settings.sources = mkIf (enabledSources != [ ]) (
|
||||
map (
|
||||
{
|
||||
sourceType,
|
||||
sourceName,
|
||||
withArgs,
|
||||
...
|
||||
}:
|
||||
"require('null-ls').builtins.${sourceType}.${sourceName}"
|
||||
+ optionalString (withArgs != null) ".with(${withArgs})"
|
||||
) enabledSources
|
||||
);
|
||||
plugins.gitsigns.enable = mkIf gitsignsEnabled true;
|
||||
extraPackages = map (source: source.package or null) enabledSources;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue