Skip to content

Commit

Permalink
Merge pull request #28 from NuschtOS/lint-packages
Browse files Browse the repository at this point in the history
 lsp: install lint packages, golangci-lint
  • Loading branch information
SuperSandro2000 authored Jul 3, 2024
2 parents 44ab9a9 + 876d0e3 commit 94f9cba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/lsp.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
rust = pkgs.fenix.stable.completeToolchain or pkgs.rust-analyzer;
in
{
extraPackages = map (pkg: pkgs.${pkg} or (with pkgs; {
golangcilint = golangci-lint;
jsonlint = nodePackages.jsonlint;
}).${pkg}) (lib.flatten (lib.attrValues config.plugins.lint.lintersByFt));

plugins = {
lint = {
enable = true;
lintersByFt = {
css = [ "eslint_d" ];
scss = [ "eslint_d" ];
gitcommit = [ "commitlint" ];
go = [ "golangcilint" ];
javascript = [ "eslint_d" ];
javascriptreact = [ "eslint_d" ];
json = [ "jsonlint" ];
markdownlint = [ "markdownlint" ];
markdownlint = [ "markdownlint-cli2" ];
nix = [ "deadnix" "nix" "statix" ];
python = [ "ruff" ];
sh = [ "shellcheck" ];
Expand Down

0 comments on commit 94f9cba

Please sign in to comment.