From 0f829552c208dcab2968fb82b9b5bf29a504b627 Mon Sep 17 00:00:00 2001 From: Lazar Bulovan Date: Sat, 21 Feb 2026 01:32:45 +0100 Subject: [PATCH] fix: limit auto-semicolon to control structure END_* keywords only - Only auto-add semicolon for END_IF, END_FOR, END_WHILE, END_REPEAT, END_CASE - Exclude block definitions (END_FUNCTION, END_FUNCTION_BLOCK, END_VAR, etc.) --- lua/scl/auto_prefix.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/scl/auto_prefix.lua b/lua/scl/auto_prefix.lua index 511ed33..e861493 100644 --- a/lua/scl/auto_prefix.lua +++ b/lua/scl/auto_prefix.lua @@ -38,11 +38,9 @@ local keywords = { "CONSTANT", "RETAIN", "NON_RETAIN", } --- Keywords that need semicolon after them (when at end of statement) +-- Keywords that need semicolon after them (control structure ends only) local end_keywords = { "END_IF", "END_FOR", "END_WHILE", "END_REPEAT", "END_CASE", - "END_VAR", "END_FUNCTION", "END_FUNCTION_BLOCK", "END_ORGANIZATION_BLOCK", - "END_TYPE", "END_STRUCT", "END_DATA_BLOCK", "END_REGION", } -- Map lowercase to uppercase for auto-conversion