From 8df739598cca79cf39f96670539644c1c4e000f9 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 28 Jan 2025 13:04:32 +0100 Subject: [PATCH] programs/editors/neovim: add back indent for nix files --- modules/programs/editors/neovim.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/programs/editors/neovim.nix b/modules/programs/editors/neovim.nix index 74782f3..bfeb81a 100644 --- a/modules/programs/editors/neovim.nix +++ b/modules/programs/editors/neovim.nix @@ -27,6 +27,15 @@ vim.opt.formatoptions:remove('c') vim.opt.formatoptions:remove('r') vim.opt.formatoptions:remove('o') + + vim.api.nvim_create_autocmd("FileType", { + pattern = "nix", + callback = function(opts) + local bo = vim.bo[opts.buf] + bo.tabstop = 2 + bo.shiftwidth = 2 + end + }) ''; maps = {