Adds support for autocomplete in multi-line array syntax like:
roles: [
'KEY_VAULT_ ← cursor triggers completion here
]
Previously only worked on same line as opening bracket:
roles: ['KEY_VAULT_ ← only this worked
Changes:
- Walk backwards up to 10 lines to find array opening (e.g. "roles: [")
- Detect if cursor is inside array based on indentation and quotes
- Stop lookback if closing bracket found (not in array anymore)
- Add test case for nested multi-line array completion
- Improve lsp_bridge.py error handling with traceback logging
- Add lsp_bridge_debug.sh wrapper for easier IntelliJ debugging
- Update EDITOR_SETUP.md with correct IntelliJ LSP4IJ config
Fixes autocomplete for deeply nested structures like:
assignments: [{ roles: ['APP_CONFIGURATION_...'] }]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The lookback regex used ([^']+) requiring one or more version chars,
so 'br/modules:modules/keyvault:' (no version yet) silently fell through
to the unknown context and injected all module names instead of params.
Change + to * to allow empty version string. The param_completion_items
fallback already handles empty version by picking the closest schema.
For specific LRU contexts (version, param, param_value), the Bicep LS was
appending its own random/irrelevant completions alongside the LRU catalog
items. The LS has no knowledge of the private ACR registry, so its suggestions
in these positions are noise.
Now the LS items are discarded entirely for these three contexts. LS items
are still kept (below LRU items) for module_path and unknown contexts.
Two bugs fixed in BicepModuleCatalog:
1. as_completion_items() generated 'br/modules:bicep/modules/appservice:...'
but bicepconfig modulePath='bicep' means Bicep prepends 'bicep/' automatically.
Fix: store ref_path = path.removeprefix('bicep/') and use it in insertText.
Correct output: 'br/modules:modules/appservice:2.3.x'
2. version/param lookups used get_module_by_name() which only matches the last
path segment ('appservice'). New-style refs capture 'modules/appservice' from
the regex, so lookup returned empty. Fix: add get_module_by_ref() that matches
both ref_path and bare name.
Also fixes _iac_param_map to strip path prefix so IAC source descriptions
still enrich completions for 'modules/appservice' refs.
All 63 tests pass.