From 781464fe74d61595d9ea4cd4a21f398c0fb82a50 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 10 Mar 2024 20:13:50 +0100 Subject: [PATCH] Add formating and linting support. --- home-manager/modules/nvim.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/home-manager/modules/nvim.nix b/home-manager/modules/nvim.nix index f2e9128..e4e533a 100644 --- a/home-manager/modules/nvim.nix +++ b/home-manager/modules/nvim.nix @@ -52,7 +52,23 @@ extraConfigLuaPost = '' vim.notify = require("mini.notify").make_notify() ''; + extraPackages = with pkgs; [ stylua isort black nixfmt ]; plugins = { + conform-nvim = { + enable = true; + formattersByFt = { + lua = [ "stylua" ]; + python = [ "isort" "black" ]; + nix = [ "nixfmt" ]; + }; + }; + lint = { + enable = true; + lintersByFt = { + python = [ "mypy" ]; + ruby = [ "ruby" ]; + }; + }; harpoon = { enable = true; keymaps = {