From 38f922093741ddcb36a24587de133a0999e00997 Mon Sep 17 00:00:00 2001 From: winter <149337190+WinterEkisha@users.noreply.github.com> Date: Sun, 8 Nov 2026 18:25:17 -0800 Subject: [PATCH] feat: nvim formatting --- home/common/features/nvimConf.nix | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/home/common/features/nvimConf.nix b/home/common/features/nvimConf.nix index 247663f..fbd7da1 100644 --- a/home/common/features/nvimConf.nix +++ b/home/common/features/nvimConf.nix @@ -36,7 +36,7 @@ autoCmd = [ { event = [ "FileType" ]; - pattern = [ "html" "css" "javascript" "typescript" "nix" ]; + pattern = [ "html" "css" "javascript" "typescript" "nix" "lua" ]; callback = { __raw = '' function() @@ -47,6 +47,33 @@ ''; }; } + { + event = [ "FileType" ]; + pattern = [ "cpp" "c" ]; + callback = { + __raw = '' + function() + vim.opt_local.expandtab = false + vim.opt_local.shiftwidth = 4 + vim.opt_local.tabstop = 4 + end + ''; + }; + } + { + event = [ "FileType" ]; + pattern = [ "rust" ]; + callback = { + __raw = '' + function() + vim.opt_local.expandtab = true + vim.opt_local.shiftwidth = 4 + vim.opt_local.softtabstop = 4 + vim.opt_local.tabstop = 4 + end + ''; + }; + } ]; plugins.cmp = {