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>
websocat reads stdin line-by-line and waits for \n before sending each chunk.
LSP JSON bodies have no trailing \n, causing a deadlock: websocat holds the
body, the server waits for the body, LSP4IJ waits for the response.
lsp_bridge.py reads complete Content-Length-framed messages before sending,
then sends each as a single binary WebSocket frame. This fixes autocomplete
in IntelliJ IDEA via LSP4IJ.
Opens actual IaC repo files (roleAssignments.bicep, Matematikfessor.bicep,
azure-pipelines.yml from UmbPlatform/MitAlinea/Next etc.) and verifies
that completions are returned from the live ilsp.i80.dk service.
14/14 tests pass:
- 7 Bicep files: 27 module completions each
- 7 azure-pipelines.yml: 254 task@version completions each
Run: python3 scripts/test_real_files.py [https://ilsp.i80.dk]
The AzDO schema is only applied by yaml-language-server when the file
URI matches the configured globs (azure-pipelines.yml / *.yaml). The
smoke test was using 'plain-pipeline.yml' which never matched, causing
test [8] to always return 0 completions.
Also increased didOpen → completion sleep from 0.8s to 1.5s to give
yaml-ls time to parse the 1.6MB AzDO schema JSON.
- Inject AzDO schema into yaml-language-server via initializationOptions
at startup (primary mechanism, works without workspace.configuration)
- Respond to workspace/configuration pull requests from yaml-language-server
so schema is applied even when editors declare configuration capability
- Keep post-init workspace/didChangeConfiguration as belt-and-suspenders
- Bake azdo-pipeline-schema.json (~1.6MB, 119 defs) into Docker image
- Add smoke test [8]: AzDO task@version completions (254 items)
- Update smoke test YAML initialize to declare workspace.configuration
- Dockerfile: COPY iac_source_catalog.json in builder + final stage
- push_catalogs.sh: cp iac_source_catalog.json to iLSP repo root before SCP
- smoke_test_completions.py: detect WS CLOSE in _recv_until_id; 20s YAML init timeout; clearer error message
- .gitignore: standard Python exclusions
Fixes: iac_source_modules=0 (was never baked into image)