bergercookie / asm-lsp

Language server for NASM/GAS/GO Assembly
https://crates.io/crates/asm-lsp
BSD 2-Clause "Simplified" License
269 stars 18 forks source link

Diagnostics #98

Closed WillLillis closed 4 months ago

WillLillis commented 4 months ago

Adds support for inline diagnostics. The current implementation publishes diagnostics whenever the client requests them, as well as every time a buffer is saved.

The current implementation extracts the relevant pieces out of compile_commands.json/compile_flags.txt, executes them in a separate process via std::process::Command, and translates the output in stderr to Diagnostic items to publish. This is a fairly heavyweight solution, so if performance proves to be an issue I can look into leveraging a thread pool so we don't block the servicing of other requests.

Demo gif (file also part of the PR):

asm-diagnostics

This checks the last main box off in #80, so I'm planning on published 0.7.2 after this feature lands.

Closes #85