- Update AGENTS.md to encourage comments instead of forbidding them
- Add docstrings to all public functions in src/ modules
- Add module headers and function comments to lua/scl/ modules
- Fix formatter to properly indent multi-line IF/ELSIF conditions
- Fix FB call detection to not match IF statements with parentheses
- Add comprehensive formatter test suite with 38 tests
- Test multiline assignments, FB calls, control structures
- Test IF, FOR, WHILE, CASE, REPEAT statements
- Test regions, structs, var sections
- Update AGENTS.md with formatter test command
- Format multi-line assignments with proper alignment
- Format FB calls in multiline style with parameter alignment
- Auto-expand collapsed attribute blocks before save
- Rename command from LspSCLFormat to SCLFormat
- Condense AGENTS.md and add testing section with reference project
- Auto-uppercase SCL keywords (IF, CASE, FOR, NOT, AND, etc.) when typing space
- Auto-add semicolon after END_* keywords (END_IF, END_FOR, etc.) when:
- Leaving insert mode on a line ending with END_*
- Pressing Enter after typing END_*
- Added complete keyword list including TYPE, STRUCT, DATA_BLOCK, etc.
- Works for .scl, .udt, and .db files
- Add case-insensitive pattern matching for attributes
- Add patterns for NonRetain and Retain attributes
- Add generic patterns for key := value and single word attributes
- Fix BufUnload autocmd to also handle *.udt and *.db files
When :LspSCLFormat is used, line numbers and positions change,
but the attr_toggle module stores state based on old positions.
This caused toggle/expand/collapse to not work after formatting.
Now clears the attr_toggle buffer state after formatting so that
users can collapse blocks fresh after formatting.
Add documentation for new attribute block toggle feature including:
- New commands: SCLToggleAttrBlock, SCLExpandAllAttrBlocks, SCLCollapseAllAttrBlocks
- New keybindings: <Leader>xa, <Leader>xae, <Leader>xac
- Feature description and usage example
The function searches for := or => patterns anywhere in the code,
without verifying that the cursor is inside an FB/Function call context
Added is_inside_fb_call() function (lines 133-176):
- Traces backwards from cursor position
- Tracks parenthesis depth to skip nested calls
- Finds the opening ( of an FB call and checks if the name before it is a known variable
- Returns true only if cursor is inside an FB/Function call
Modified jump_to_next_param() (lines 178-189):
- Now returns false immediately if not inside an FB call context
- This causes the keymap to fall back to normal <Tab> behavior
Result:
- Inside FB call: <Tab> jumps to next := or =>
- Outside FB call: <Tab> behaves normally (inserts tab character)
The completion now correctly handles DB patterns after any operator
(:=, =>, =, <>, >=, <=, >, <, AND, OR, NOT) by finding the last operator
and only matching DB patterns in the active portion after it.
- Add db_parser.lua to parse .db files (DATA_BLOCK with VAR sections)
- Update workspace_types.lua to scan for .db files in project
- Update blink_cmp_source.lua to provide DB auto-completion:
- DB names available in general completion (without quotes)
- Type quote to get DB members
- Multi-level nested member access support
- Add DB count to workspace commands
- Update README with Global DB documentation
- Fix FB/function call parameter detection to prevent incorrect # prefixing
- Preserve # prefix when filling multiline params
- Add comma after first parameter and closing bracket on last param line
- Fix Tab navigation to position cursor after :=/=> operators
- Clean up dead code in multiline_params.lua
- Add setup functions for multiline params feature in both scl and scl_lsp