From 1508fd8fb38e482244ebf2311145249bdbbcaebb Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Thu, 3 Jun 2021 11:49:52 -0700 Subject: [PATCH] Update misc-utils.lua Not DRY or elegant, but allows for file specific tabbing. Python uses 4 by std while the JS/TS ecosystem uses 2. --- lua/misc-utils.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 3fb8d2a..86285c9 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -40,5 +40,7 @@ function M.has_width_gt(cols) -- Check if the windows width is greater than a given number of columns return vim.fn.winwidth(0) / 2 > cols end - +-- file extension specific tabbing +vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) +vim.cmd([[autocmd Filetype bash setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]]) return M