feat: live LSP error underlines + improved VS Code extension
ci / build (ubuntu) (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
ci / build (ubuntu) (push) Has been cancelled
ci / unit + fmt (push) Has been cancelled
ci / examples (push) Has been cancelled
ci / goldens + tools (push) Has been cancelled
ci / apps (push) Has been cancelled
ci / selfhost smoke (push) Has been cancelled
ci / macos smoke (push) Has been cancelled
ci / windows smoke (push) Has been cancelled
ci / CI gate (push) Has been cancelled
selfhost-loop / bootstrap determinism (push) Has been cancelled
bux-lsp 0.17 publishes in-process diagnostics on open/change/save so editors show red squiggles for lex/parse/type errors in the live buffer. VS Code client discovers tools/bux-lsp, adds status bar/restart, richer syntax/snippets, and docs (docs/LSP.md) for forum/editor setup.
This commit is contained in:
+15
-6
@@ -332,16 +332,25 @@ make docs # writes docs/api/stdlib.md
|
||||
Scans `///` line comments (and bootstrap also accepts adjacent `/* */`) immediately
|
||||
before `func` / `struct` / `enum` / `interface` / `module` declarations.
|
||||
|
||||
### Language Server (`bux-lsp` 0.4.0)
|
||||
### Language Server (`bux-lsp` 0.17.0)
|
||||
|
||||
Full write-up: **[LSP.md](LSP.md)**. VS Code client: **[../vscode/README.md](../vscode/README.md)**.
|
||||
|
||||
```bash
|
||||
make lsp # → tools/bux-lsp
|
||||
nim r --path:bootstrap tools/test_lsp_locals.nim
|
||||
./tools/smoke_lsp_hover.sh
|
||||
make test-lsp # unit + all smoke_lsp_*.sh
|
||||
make vscode # compile VS Code extension (npm)
|
||||
```
|
||||
|
||||
Features: diagnostics (`buxc check`), hover, go-to-def, outline, completion.
|
||||
**Locals are position-sensitive** (nested scopes / shadowing). **Inferred `let` types**
|
||||
appear on hover (`let x: int · inferred`).
|
||||
| Area | Status |
|
||||
|------|--------|
|
||||
| **Error underlines** | ✅ live on open/**change**/save (in-process lex/parse/sema) |
|
||||
| Hover / definition / completion | ✅ (scoped locals + inferred `let`) |
|
||||
| References / rename | ✅ (fields, variants, methods, import paths) |
|
||||
| Document + workspace symbols | ✅ |
|
||||
| Call hierarchy / type hierarchy / implementation | ✅ |
|
||||
|
||||
Any editor that speaks **LSP over stdio** can run `tools/bux-lsp` directly.
|
||||
|
||||
### Example Programs
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user