Skip to content

Commit

Permalink
null-ls: add beautysh and shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
pta2002 committed Nov 15, 2022
1 parent 4f08c8a commit 4c36cdc
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 7 deletions.
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
inputs.nmdSrc.url = "gitlab:rycee/nmd";
inputs.nmdSrc.flake = false;

inputs.beautysh.url = "github:lovesegfault/beautysh";
inputs.beautysh.inputs.nixpkgs.follows = "nixpkgs";

outputs = { self, nixpkgs, nmdSrc, flake-utils, ... }@inputs:
with nixpkgs.lib;
with builtins;
Expand All @@ -22,6 +25,7 @@
pkgs = mkForce pkgs;
inherit (pkgs) lib;
helpers = import ./plugins/helpers.nix { inherit (pkgs) lib; };
inputs = inputs;
};
};
})
Expand Down
8 changes: 7 additions & 1 deletion plugins/null-ls/servers.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }@args:
{ pkgs, config, lib, inputs, ... }@args:
let
helpers = import ./helpers.nix args;
serverData = {
Expand All @@ -8,6 +8,9 @@ let
flake8 = {
packages = [ pkgs.python3Packages.flake8 ];
};
shellcheck = {
packages = [ pkgs.shellcheck ];
};
};
formatting = {
phpcbf = {
Expand All @@ -25,6 +28,9 @@ let
black = {
packages = [ pkgs.python3Packages.black ];
};
beautysh = {
packages = [ inputs.beautysh.packages.${pkgs.system}.beautysh-python38 ];
};
};
};
# Format the servers to be an array of attrs like the following example
Expand Down
144 changes: 138 additions & 6 deletions tests/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions tests/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
plugins.trouble.enable = true;
};

beautysh = build {
plugins.null-ls = {
enable = true;
sources.formatting.beautysh.enable = true;
};
};

issue-40 = build-stable {
plugins = {
nix.enable = true;
Expand Down

0 comments on commit 4c36cdc

Please sign in to comment.