summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-03-06 17:22:17 +0100
committerNatasha Moongrave <natasha@256phi.eu>2026-03-06 17:22:17 +0100
commitf3cecbd9ca95eb5a9023c1b99b7002954a8af4c3 (patch)
tree9f9f0b63fb517acd9d8e6fccf0df4dcefcec8ede
parent614b0284534168fb81819382443f3b67080c7a19 (diff)
added autoformatter config setup to nvim.nix
-rw-r--r--modules/home/i3wm/nord-blue/nvim.nix25
1 files changed, 24 insertions, 1 deletions
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
-------------------------------------------------