From 137eda3e7741a910e31a585ce0e197742ae6df0f Mon Sep 17 00:00:00 2001 From: Lazar Bulovan Date: Tue, 24 Feb 2026 15:21:21 +0100 Subject: [PATCH] fix: Attribute block expand/collapse, TIME literal diagnostics, and formatter bugs - SCLFormat: Remove clear_buffer_state() call that was preventing expand after formatting (attr_toggle state now preserved) - Diagnostics: Fix false 'Undefined variable' for IEC literals like T#2s, D#1d, S5T#1s (TIME, DATE, S5TIME types) - Formatter: Fix block comments (* ... *) being misidentified as FB calls in VAR_IN_OUT/VAR_INPUT/VAR_OUTPUT sections - Formatter: Fix array-based FB calls like instTimers[idx].TON() not being properly formatted with aligned parameters --- lua/scl_lsp/init.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lua/scl_lsp/init.lua b/lua/scl_lsp/init.lua index 45c413e..22cab3d 100644 --- a/lua/scl_lsp/init.lua +++ b/lua/scl_lsp/init.lua @@ -36,10 +36,6 @@ function M.setup(opts) if opts.lsp and opts.lsp.formatting then vim.api.nvim_buf_create_user_command(b, "SCLFormat", function() vim.lsp.buf.format({ name = "scl_lsp" }) - local ok, at = pcall(require, "scl.attr_toggle") - if ok then - at.clear_buffer_state(vim.api.nvim_get_current_buf()) - end end, {}) end end, @@ -57,10 +53,6 @@ function M.setup(opts) -- Create global format command (works on current buffer) vim.api.nvim_create_user_command("SCLFormat", function() vim.lsp.buf.format({ name = "scl_lsp" }) - local ok, at = pcall(require, "scl.attr_toggle") - if ok then - at.clear_buffer_state(vim.api.nvim_get_current_buf()) - end end, {}) -- Start LSP for any existing scl buffers (handles lazy loading case)