fix(bicep): support multi-line array completion for roles and other enums
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>
This commit is contained in:
12
scripts/lsp_bridge_debug.sh
Executable file
12
scripts/lsp_bridge_debug.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Wrapper for lsp_bridge.py that logs to a file for debugging IntelliJ issues
|
||||
|
||||
LOG_FILE="/tmp/lsp_bridge_debug.log"
|
||||
|
||||
echo "=== LSP Bridge started at $(date) ===" >> "$LOG_FILE"
|
||||
echo "Args: $@" >> "$LOG_FILE"
|
||||
echo "PWD: $(pwd)" >> "$LOG_FILE"
|
||||
echo "Python: $(which python3)" >> "$LOG_FILE"
|
||||
echo "" >> "$LOG_FILE"
|
||||
|
||||
exec /opt/homebrew/bin/python3 /Users/lrihni/Projects/iLSP/scripts/lsp_bridge.py "$@" 2>> "$LOG_FILE"
|
||||
Reference in New Issue
Block a user