From 439eec75c3550ae43e65420d3967cf2fe706f4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sat, 2 Mar 2024 21:12:45 +0100 Subject: [PATCH] feat(nvim): Setup nvim-lint through nixvim config --- nvim/augroups.nix | 11 ----------- nvim/default.nix | 7 ------- nvim/plugins/default.nix | 8 ++++++++ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/nvim/augroups.nix b/nvim/augroups.nix index d843dde..57dc238 100644 --- a/nvim/augroups.nix +++ b/nvim/augroups.nix @@ -1,6 +1,5 @@ { autoGroups."highlightOnYank" = { }; - autoGroups."runLinter" = { }; autoGroups."lspConfig" = { }; autoGroups."restoreCursorPosition" = { }; autoCmd = [ @@ -21,16 +20,6 @@ ''; }; } - { - group = "runLinter"; - event = "BufWritePost"; - pattern = "*"; - callback = { - __raw = '' - require("lint").try_lint() - ''; - }; - } { group = "restoreCursorPosition"; event = "BufReadPost"; diff --git a/nvim/default.nix b/nvim/default.nix index d5810fa..f3f6175 100644 --- a/nvim/default.nix +++ b/nvim/default.nix @@ -46,7 +46,6 @@ in rustaceanvim idris2-nvim nui-nvim - nvim-lint ]) ++ (with pkgs.vimPlugins; [ lualine-lsp-progress @@ -119,12 +118,6 @@ in do -- Setup idris2-nvim require("idris2").setup { } end - - do -- Setup nvim-lint - require("lint").linters_by_ft = { - latex = { "chktex", "typos" }, - } - end ''; }; }; diff --git a/nvim/plugins/default.nix b/nvim/plugins/default.nix index d0b0e4d..848fbed 100644 --- a/nvim/plugins/default.nix +++ b/nvim/plugins/default.nix @@ -14,4 +14,12 @@ treesitter.incrementalSelection.enable = true; treesitter-context.enable = true; trouble.enable = true; + lint = { + enable = true; + lintersByFt = { + rust = [ "typos" ]; + latex = [ "chktex" "typos" ]; + markdown = [ "typos" ]; + }; + }; }