From 51045f2fdb3cb83e836f0c08ca327ed7142cb3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 4 Jul 2024 00:10:14 +0200 Subject: [PATCH 1/2] lsp: install lint packages --- modules/lsp.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/lsp.nix b/modules/lsp.nix index 29a82e4..fd68b76 100644 --- a/modules/lsp.nix +++ b/modules/lsp.nix @@ -1,8 +1,13 @@ -{ 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; @@ -13,7 +18,7 @@ in javascript = [ "eslint_d" ]; javascriptreact = [ "eslint_d" ]; json = [ "jsonlint" ]; - markdownlint = [ "markdownlint" ]; + markdownlint = [ "markdownlint-cli2" ]; nix = [ "deadnix" "nix" "statix" ]; python = [ "ruff" ]; sh = [ "shellcheck" ]; From 876d0e3c3a4d757f924c58ca5f36507bca8774a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 4 Jul 2024 00:10:21 +0200 Subject: [PATCH 2/2] lsp: add golangci-lint --- modules/lsp.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/lsp.nix b/modules/lsp.nix index fd68b76..53d4fad 100644 --- a/modules/lsp.nix +++ b/modules/lsp.nix @@ -15,6 +15,7 @@ in css = [ "eslint_d" ]; scss = [ "eslint_d" ]; gitcommit = [ "commitlint" ]; + go = [ "golangcilint" ]; javascript = [ "eslint_d" ]; javascriptreact = [ "eslint_d" ]; json = [ "jsonlint" ];