Skip to main content

Module code_actions

Module code_actions 

Source
Expand description

Code actions for diagnostic suggestions (ADR-0091 Phase 2).

Every JsonDiagnostic.suggestions entry the compiler produces becomes a quickfix code action when the editor’s cursor (or selected range) overlaps the diagnostic’s range. We stashed the suggestions on the diagnostic’s data field in Phase 1, so we just decode them here.

Functions§

code_actions_for_range
Build LSP CodeActions for every JsonSuggestion attached to diagnostics (via Phase 1’s data field) whose primary range overlaps the requested range.