From f9f81650457e18dc07ee841a5a96a0f8bc353447 Mon Sep 17 00:00:00 2001 From: 40DEEA <40deea@gmail.com> Date: Tue, 21 Oct 2025 22:51:09 -0700 Subject: [PATCH] Add default indentation config --- init.lua | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 18a29aa5..55ccc7f9 100644 --- a/init.lua +++ b/init.lua @@ -247,7 +247,29 @@ rtp:prepend(lazypath) -- NOTE: Here is where you install your plugins. require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically + { + 'NMAC427/guess-indent.nvim', + event = 'BufReadPre', + -- 👇 First, set global defaults + init = function() + vim.opt.expandtab = true + vim.opt.tabstop = 4 + vim.opt.softtabstop = 4 + vim.opt.shiftwidth = 4 + end, + opts = { + auto_cmd = true, -- automatically guess indent on file open + filetype_exclude = { 'netrw', 'tutor' }, + buftype_exclude = { 'help', 'nofile', 'terminal', 'prompt' }, + + -- 👇 your fallback defaults + default_indent = { + tabstop = 4, + shiftwidth = 4, + expandtab = true, + }, + }, + }, -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following