diff --git a/AGENTS.md b/AGENTS.md index 1973feb..d0c9551 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -167,7 +167,7 @@ statCntrPartsIn{...} : Int; local options = { insertSpaces = false, tabSize = 1, - collapseAttributes = true, -- Enable attribute collapsing (default: true) + collapseAttributes = false, -- Disabled by default (see note below) collapsePatterns = { -- Override default patterns "^%s*{%s*EXTERNAL", "^%s*{ S7_", @@ -178,6 +178,11 @@ local options = { } ``` +**Note:** `collapseAttributes` is disabled by default to preserve compatibility with the interactive toggle feature (`:SCLToggleAttrBlock`). When the formatter automatically collapses blocks, the original content is lost. To use both formatting and toggle: +1. Format with `:LspSCLFormat` (preserves original content) +2. Manually collapse with `:SCLCollapseAllAttrBlocks` (stores original content) +3. Now toggle/expand works correctly + ### Default Collapse Patterns - `^%s*{%s*EXTERNAL` - Variable attributes: `{EXTERNALACCESSIBLE := 'false'; ...}` - `^%s*{ S7_` - Block attributes: `{ S7_Optimized_Access := 'TRUE' }`