From 0b23e44d2dbc9ba25d363edadbd91a5af2101ba5 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Thu, 24 Jul 2025 07:17:00 +0200 Subject: [PATCH] fix(python): improve indent handling --- lua/ow/core/autocommands.lua | 7 +------ lua/ow/core/globals.lua | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/ow/core/autocommands.lua b/lua/ow/core/autocommands.lua index b26a968..f005ffc 100644 --- a/lua/ow/core/autocommands.lua +++ b/lua/ow/core/autocommands.lua @@ -56,11 +56,6 @@ 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, - } + vim.opt_local.indentkeys:remove("<:>") end, }) - diff --git a/lua/ow/core/globals.lua b/lua/ow/core/globals.lua index 8f582f3..7749418 100644 --- a/lua/ow/core/globals.lua +++ b/lua/ow/core/globals.lua @@ -12,6 +12,11 @@ vim.g.netrw_sort_sequence = '[\\/]\\s*,*' vim.g.netrw_special_syntax = 1 vim.g.netrw_timefmt = '%d-%m-%Y %H:%M' vim.g.c_syntax_for_h = 1 +vim.g.python_indent = { + open_paren = "shiftwidth()", + continue = "shiftwidth()", + closed_paren_align_last_line = false, +} local termfeatures = vim.g.termfeatures or {} termfeatures.osc52 = false