feat: YAML LSP (/yaml endpoint) + IAC source catalog enrichment
All checks were successful
Build and Deploy iLSP / test (push) Successful in 21s
Build and Deploy iLSP / build-and-deploy (push) Successful in 2m49s

- Add yaml-language-server (Node.js) to Dockerfile stage 3
- Add YAML_LSP_PORT=2090 env var (Dockerfile + ilsp.nomad)
- Start yaml-language-server in background thread (_serve_yaml_lsp)
- Expose /yaml WebSocket endpoint (same WS→TCP proxy as /python and /bicep)
- Load iac_source_catalog.json alongside bicep_modules_catalog.json
- Enrich param_completion_items() with descriptions + required flag from IAC source
  - Required params sorted first (sortText 0_lru_param_0_...) and marked with *
  - detail field shows * prefix for required params
- Update /health to report iac_source_modules + yaml_lsp fields
- Rewrite EDITOR_SETUP.md: WebSocket URLs, YAML schemas config for all editors
  (Helix, Neovim, PyCharm, VS Code) with azure-pipelines + gitea actions schemas
- All 35 tests pass
This commit is contained in:
Henrik Jess Nielsen
2026-05-10 15:40:13 +02:00
parent b93aa84737
commit 5501254b55
5 changed files with 161 additions and 36 deletions

View File

@@ -1,42 +1,105 @@
# Editor configs for lsp.i80.dk
# Editor configs for ilsp.i80.dk
## Available endpoints
| Endpoint | Language | Port (internal) |
|----------|----------|-----------------|
| `wss://ilsp.i80.dk/python` | Python | 2087 |
| `wss://ilsp.i80.dk/bicep` | Bicep + LRU modules | 2088 |
| `wss://ilsp.i80.dk/yaml` | YAML (pipelines, Actions) | 2090 |
## VS Code (`.vscode/settings.json` — recommended)
Install the **vscode-lsp-client** or use the built-in `yaml` extension for YAML:
```json
{
"yaml.schemas": {
"https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json": [
"azure-pipelines.yml",
"azure-pipelines*.yml"
],
"https://json.schemastore.org/github-workflow.json": [
".github/workflows/*.yml",
".gitea/workflows/*.yml"
]
},
"yaml.customTags": [],
"yaml.validate": true,
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
}
}
```
> For Python and Bicep in VS Code, the built-in extensions (Pylance, Bicep) are preferred.
> Use ilsp endpoints if you want i80-specific completions (pypi packages, LRU modules).
## Helix (`~/.config/helix/languages.toml`)
```toml
[language-server.ilsp-python]
command = "nc"
args = ["lsp.i80.dk", "2087"]
command = "websocat"
args = ["wss://ilsp.i80.dk/python"]
[language-server.ilsp-bicep]
command = "nc"
args = ["lsp.i80.dk", "2088"]
command = "websocat"
args = ["wss://ilsp.i80.dk/bicep"]
[language-server.ilsp-yaml]
command = "websocat"
args = ["wss://ilsp.i80.dk/yaml"]
[[language]]
name = "python"
language-servers = ["ilsp-python", "pylsp"] # runs alongside local pylsp if present
language-servers = ["ilsp-python"]
[[language]]
name = "bicep"
file-types = ["bicep", "bicepparam"]
language-servers = ["ilsp-bicep"]
[[language]]
name = "yaml"
file-types = ["yaml", "yml"]
language-servers = ["ilsp-yaml"]
```
## Neovim (`~/.config/nvim/lua/lsp.lua`)
```lua
-- Python: i80 completions alongside pyright
-- Python: i80 pypi completions
vim.lsp.start({
name = "ilsp-python",
cmd = { "nc", "lsp.i80.dk", "2087" },
name = "ilsp-python",
cmd = { "websocat", "wss://ilsp.i80.dk/python" },
filetypes = { "python" },
})
-- Bicep: full Bicep LS via i80 proxy
-- Bicep: LRU module completions
vim.lsp.start({
name = "ilsp-bicep",
cmd = { "nc", "lsp.i80.dk", "2088" },
name = "ilsp-bicep",
cmd = { "websocat", "wss://ilsp.i80.dk/bicep" },
filetypes = { "bicep" },
})
-- YAML: Azure Pipelines + Gitea Actions schema
vim.lsp.start({
name = "ilsp-yaml",
cmd = { "websocat", "wss://ilsp.i80.dk/yaml" },
filetypes = { "yaml" },
settings = {
yaml = {
schemas = {
["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = {
"azure-pipelines.yml", "azure-pipelines*.yml"
},
["https://json.schemastore.org/github-workflow.json"] = {
".github/workflows/*.yml", ".gitea/workflows/*.yml"
},
},
},
},
})
```
## PyCharm / IntelliJ IDEA Ultimate (LSP4IJ plugin)
@@ -44,22 +107,11 @@ vim.lsp.start({
1. Install **LSP4IJ** from JetBrains Marketplace
2. Settings → Languages & Frameworks → Language Servers → **+**
| Field | Python | Bicep |
|----------------|-------------------------|-------------------------|
| Name | `ilsp-python` | `ilsp-bicep` |
| Server type | External process | External process |
| Command | `nc lsp.i80.dk 2087` | `nc lsp.i80.dk 2088` |
| File patterns | `*.py` | `*.bicep, *.bicepparam` |
| Field | Python | Bicep | YAML |
|----------------|-------------------------------------|--------------------------------|-------------------------------------|
| Name | `ilsp-python` | `ilsp-bicep` | `ilsp-yaml` |
| Server type | External process | External process | External process |
| Command | `websocat wss://ilsp.i80.dk/python` | `websocat wss://ilsp.i80.dk/bicep` | `websocat wss://ilsp.i80.dk/yaml` |
| File patterns | `*.py` | `*.bicep, *.bicepparam` | `*.yml, *.yaml` |
> PyCharm's built-in Python intelligence runs **alongside** ilsp-python — additive, not replacing.
## VS Code (`.vscode/settings.json`)
```json
{
"pylsp.server.command": ["nc", "lsp.i80.dk", "2087"],
"bicep.languageServerPath": "nc"
}
```
> Note: VS Code has better native support. Use only if you want the i80-specific completions.