From 527ac6fce91f391071159e20b06ddf62317dd1ca Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Wed, 27 Nov 2024 15:49:59 +0100 Subject: [PATCH] home (nvim): Configure tab to be four spaces for JVM languages --- home/terminal/nvim/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/home/terminal/nvim/default.nix b/home/terminal/nvim/default.nix index 7cc7c0b..f2f5b43 100644 --- a/home/terminal/nvim/default.nix +++ b/home/terminal/nvim/default.nix @@ -48,6 +48,18 @@ in { swapfile = false; }; autoCmd = [ + { + event = ["BufNewFile" "BufRead"]; + pattern = ["*.java" "*.kt" "*.kts" "*.groovy"]; + callback.__raw = + # lua + '' + function () + vim.opt_local.tabstop = 4 + vim.opt_local.softtabstop = 4 + end + ''; + } { event = ["BufNewFile" "BufRead"]; pattern = ["*.log"];