diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-01-17 01:29:22 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-01-17 01:29:22 +0530 |
| commit | 85d3bb6aee3784eed3e9a2bd5d10a8ed89fd229c (patch) | |
| tree | 8ede1eb843a7314147766fdec865e4772c1007bd /modules | |
| parent | 9b7230728efb02cea42f32ec260f113e611d0caf (diff) | |
| download | home-manager-config-85d3bb6aee3784eed3e9a2bd5d10a8ed89fd229c.tar.gz home-manager-config-85d3bb6aee3784eed3e9a2bd5d10a8ed89fd229c.zip | |
Changed nixvim configuration.
Using tabs for indentation in all files except yaml.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/tools/nixvim/default.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/modules/tools/nixvim/default.nix b/modules/tools/nixvim/default.nix index 56c55e6..97d58ec 100644 --- a/modules/tools/nixvim/default.nix +++ b/modules/tools/nixvim/default.nix @@ -59,6 +59,26 @@ vim.api.nvim_set_hl(0, 'NotifyINFOBody', { link = 'Normal' }) vim.api.nvim_set_hl(0, 'NotifyDEBUGBody', { link = 'Normal' }) vim.api.nvim_set_hl(0, 'NotifyTRACEBody', { link = 'Normal' }) + + vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = "*", + callback = function() + vim.opt_local.expandtab = false + vim.opt_local.shiftwidth = 3 + vim.opt_local.softtabstop = 3 + vim.opt_local.tabstop = 3 + end, + }) + + vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = { "yaml", "yml" }, + callback = function() + vim.opt_local.expandtab = true + vim.opt_local.shiftwidth = 2 + vim.opt_local.softtabstop = 2 + vim.opt_local.tabstop = 2 + end, + }) ''; performance = { byteCompileLua.enable = true; @@ -66,8 +86,6 @@ }; }; - home.sessionVariables = { - EDITOR = "nvim"; - }; + home.sessionVariables.EDITOR = "nvim"; }; } |
