feat: add benchmarks and enhance LSP completions/hover

Benchmarks:
- Add fib, list_ops, primes benchmarks comparing Lux vs Node.js vs Rust
- Lux matches Rust performance and is 8-30x faster than Node.js
- Add docs/benchmarks.md documenting results

LSP improvements:
- Context-aware completions (module access vs general)
- Add List, String, Option, Result, Console, Math method completions
- Add type and builtin completions
- Hover now shows type signatures and documentation for known symbols
- Hover returns formatted markdown with code blocks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 15:23:35 -05:00
parent 1ca31fe985
commit 2960dd6538
12 changed files with 647 additions and 72 deletions

8
benchmarks/fib.js Normal file
View File

@@ -0,0 +1,8 @@
// Fibonacci benchmark - recursive implementation
function fib(n) {
if (n <= 1) return n;
return fib(n - 1) + fib(n - 2);
}
const result = fib(35);
console.log(`fib(35) = ${result}`);