Using the Zig Compiler's Incremental Semantic Analysis as a Foundation for Near-instant Code Feedback via LSP
This project is a proof-of-concept/viability effort. The intention is to demonstrate the potential of using Zig's incremental semantic analysis for near-instant code feedback via LSP, and as a potential bridge between today and when the Zig Compile Server emerges.
The server requires a valid workspace folder path to be passed in the initialize
request by the editor. If an editor does not provide this information, the server will fall back to basic functionality.
To ensure correct modules lookup, please refer to the wiki page.
Conditionals like if
and else
can influence what is analyzed. Make sure you're aware of the implications when editing code within these blocks.
incr-comp_active_path.mp4
Note
This is a resource-intensive piece of software, so a capable CPU with good single-thread performance is recommended.
zig build -Doptimize=ReleaseFast --zig-lib-dir ./lib/