From 363c16b338380d67844326095fdd3e9a13d97ef2 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sat, 29 Mar 2025 21:57:34 +0100 Subject: [PATCH] fix(python): change indent behavior --- lua/core/autocommands.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/core/autocommands.lua b/lua/core/autocommands.lua index 5dd677d..f4f1fca 100644 --- a/lua/core/autocommands.lua +++ b/lua/core/autocommands.lua @@ -61,3 +61,15 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +vim.api.nvim_create_autocmd("FileType", { + desc = "Customize python indentation", + pattern = { "python" }, + callback = function() + vim.g.python_indent = { + open_paren = 'shiftwidth()', + continue = 'shiftwidth()', + closed_paren_align_last_line = false, + } + end, +}) +