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 1/2] 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 From 9e6e043016bf84b0e9ee3b8e05c472a4adbf68e6 Mon Sep 17 00:00:00 2001 From: Henri <52706578+Vanderscycle@users.noreply.github.com> Date: Thu, 3 Jun 2021 11:53:51 -0700 Subject: [PATCH 2/2] Update misc-utils.lua bash doesn't really have a std other than 2, 4, 8 spaces --- lua/misc-utils.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/misc-utils.lua b/lua/misc-utils.lua index 86285c9..bab2b56 100644 --- a/lua/misc-utils.lua +++ b/lua/misc-utils.lua @@ -42,5 +42,4 @@ function M.has_width_gt(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