feat: implement LSP server for IDE integration

Add a Language Server Protocol (LSP) server to enable IDE integration.
The server provides:

- Real-time diagnostics (parse errors and type errors)
- Basic hover information
- Keyword completions (fn, let, if, match, type, effect, etc.)
- Go-to-definition stub (ready for implementation)

Usage: lux --lsp

The LSP server can be integrated with any editor that supports LSP,
including VS Code, Neovim, Emacs, and others.

Dependencies added:
- lsp-server 0.7
- lsp-types 0.94
- serde with derive feature
- serde_json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 05:42:37 -05:00
parent 3206aad653
commit 20bf75a5f8
4 changed files with 722 additions and 7 deletions

View File

@@ -8,6 +8,10 @@ license = "MIT"
[dependencies]
rustyline = "14"
thiserror = "1"
lsp-server = "0.7"
lsp-types = "0.94"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
[dev-dependencies]
tempfile = "3"