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.
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