From f3cecbd9ca95eb5a9023c1b99b7002954a8af4c3 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Fri, 6 Mar 2026 17:22:17 +0100 Subject: added autoformatter config setup to nvim.nix --- modules/home/i3wm/nord-blue/nvim.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/modules/home/i3wm/nord-blue/nvim.nix b/modules/home/i3wm/nord-blue/nvim.nix index 6055c13..a5013c9 100644 --- a/modules/home/i3wm/nord-blue/nvim.nix +++ b/modules/home/i3wm/nord-blue/nvim.nix @@ -60,6 +60,11 @@ plugin = vim-startify; config = "let g:startify_change_to_vcs_root = 0"; } + + stylua + alejandra + black + shfmt ]; ################################################# @@ -132,7 +137,25 @@ vim.lsp.enable("pyright", {}) vim.lsp.enable("bashls", {}) vim.lsp.enable("texlab", {}) - + + ------------------------------------------------- + -- FORMATTER + ------------------------------------------------- + require("conform").setup({ + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_format = "fallback", + }, + + formatters_by_ft = { + lua = { "stylua" }, + nix = { "alejandra" }, + rust = { "rustfmt" }, + python = { "black" }, + bash = { "shfmt" }, + }, + }) ------------------------------------------------- -- TELESCOPE ------------------------------------------------- -- cgit v1.2.3