From 8b7ad62cff07adac1a2feff8338f6cfdc60c7196 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Fri, 21 Mar 2025 08:58:43 +0100 Subject: [PATCH] use `vim.env` for detecting environment variables --- templates/nvim/lua/formatting.lua.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/nvim/lua/formatting.lua.j2 b/templates/nvim/lua/formatting.lua.j2 index a6a4ff0..10c6332 100644 --- a/templates/nvim/lua/formatting.lua.j2 +++ b/templates/nvim/lua/formatting.lua.j2 @@ -1,4 +1,6 @@ -local enable_formatting = os.getenv("enable_formatting") == 'true'; +-- {{ ansible_managed }} + +local enable_formatting = vim.env.enable_formatting == 'true'; if (enable_formatting) then vim.api.nvim_create_autocmd('LspAttach', {