diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2024-09-30 22:31:37 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2024-09-30 22:31:37 +0530 |
| commit | 5f8027fef5ab482be9275aa310ac22dd1d414159 (patch) | |
| tree | b0e8712d770e615d1222ebb6b3d3aeb566fe7fb0 /modules/tools/editor/neovim/config | |
| parent | b89e5d998891feb55b14220e129c6ee69c98cacb (diff) | |
| download | home-manager-config-5f8027fef5ab482be9275aa310ac22dd1d414159.tar.gz home-manager-config-5f8027fef5ab482be9275aa310ac22dd1d414159.zip | |
Changed the zsh prompt and forcing neovim to use tabs instead of spaces for all files.
Diffstat (limited to 'modules/tools/editor/neovim/config')
| -rw-r--r-- | modules/tools/editor/neovim/config/options.lua | 20 |
1 files changed, 20 insertions, 0 deletions
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, +}); |
