Skip to main content

Module code_actions

Module code_actions 

Source
Expand description

v0.26 (ADR 0054): pure codeAction computation — quick-fixes from the structured bynk_syntax::error::Suggestions riding on a cached analysis round’s diagnostics.

Keying rule: a diagnostic’s suggestions are offered when the requested range intersects the diagnostic’s span — never the edits’ spans, which for both given fixes land away from the squiggle (the usage site in the body vs the clause in the signature). Positions convert against the analysed snapshot (the v0.24 rule); edits are versioned against the analysed document version, so a drifted buffer rejects the edit rather than mis-applying it.

Functions§

intersects 🔒
Closed intersection over half-open spans: a cursor request (an empty range) sitting on either boundary of the diagnostic still matches.
quick_fixes
Quick-fixes for every suggestion whose owning diagnostic intersects the requested range. text and version are the analysed snapshot and the open-document version captured with it.