Skip to content

Commit

Permalink
null-ls: add black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
pta2002 committed Nov 13, 2022
1 parent ac6deb4 commit fb22deb
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions plugins/null-ls/servers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
let
helpers = import ./helpers.nix args;
serverData = {
code_actions = {
};
completion = {
};
code_actions = { };
completion = { };
diagnostics = {
flake8 = {
packages = [ pkgs.python3Packages.flake8 ];
};
};
formatting = {
phpcbf = {
Expand All @@ -21,8 +22,8 @@ let
prettier = {
packages = [ pkgs.nodePackages.prettier ];
};
flake8 = {
packages = [ pkgs.python3Packages.flake8 ];
black = {
packages = [ pkgs.python3Packages.black ];
};
};
};
Expand All @@ -32,9 +33,11 @@ let
# sourceType = "formatting";
# packages = [...];
# }]
serverDataFormatted = lib.mapAttrsToList (sourceType: sourceSet:
lib.mapAttrsToList (name: attrs: attrs // { inherit sourceType name; }) sourceSet
) serverData;
serverDataFormatted = lib.mapAttrsToList
(sourceType: sourceSet:
lib.mapAttrsToList (name: attrs: attrs // { inherit sourceType name; }) sourceSet
)
serverData;
dataFlattened = lib.flatten serverDataFormatted;
in
{
Expand Down

0 comments on commit fb22deb

Please sign in to comment.