From 5f8027fef5ab482be9275aa310ac22dd1d414159 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:31:37 +0530 Subject: Changed the zsh prompt and forcing neovim to use tabs instead of spaces for all files. --- modules/tools/editor/neovim/config/options.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'modules/tools/editor/neovim/config') diff --git a/modules/tools/editor/neovim/config/options.lua b/modules/tools/editor/neovim/config/options.lua index b1fe9cb..17772ca 100644 --- a/modules/tools/editor/neovim/config/options.lua +++ b/modules/tools/editor/neovim/config/options.lua @@ -19,3 +19,23 @@ vim.o.expandtab = false; vim.o.updatetime = 300; vim.o.mouse = "a"; + +-- Force all filetypes to use tabs +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function() + vim.bo.expandtab = false; + vim.bo.tabstop = 2; + vim.bo.shiftwidth = 2; + end, +}); + +-- Exception that use spaces +vim.api.nvim_create_autocmd("FileType", { + pattern = {}, + callback = function() + vim.bo.expandtab = true; + vim.bo.tabstop = 2; + vim.bo.shiftwidth = 2; + end, +}); -- cgit v1.2.3