diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-16 23:56:42 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-16 23:56:42 +0300 |
| commit | 37d0049e7a7b55d40af6da1a884810a543fead22 (patch) | |
| tree | fd2541df7bd996d90d56e2b372b9561177a22dba /README.md | |
| parent | c971c7f8a88d11f2b692a1bcd4d17b9b0c1a11d2 (diff) | |
lsp: add 'Resolve diagnostics' code action scoped to selection
- Parse diagnostics from CodeAction context; filter to overlap with selection
- Build LLM prompt from selection-only diagnostics; replace only selected range
- Keep existing 'Rewrite selection' action; return both when applicable
- Add Diagnostic and CodeActionContext types; make CodeActionParams.Context raw JSON
- Add helpers for range overlap; unit tests for filtering/overlap
- Update README to document resolve-diagnostics action
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -116,10 +116,13 @@ action from the LLM and then clean up the tag automatically. ## Code actions -Hexai provides a code action for working with the current selection in Helix: +Hexai provides code actions that operate only on the current selection in Helix: -- Rewrite selection: Select code and invoke code actions. Hexai looks for the - first instruction inside the selection and rewrites the selection accordingly. +- Rewrite selection: Hexai looks for the first instruction inside the selection + and rewrites the selection accordingly. +- Resolve diagnostics: With a selection active, Hexai gathers only diagnostics + that overlap your selection and fixes them by editing only the selected code. + Diagnostics outside the selection are not modified. Instruction sources (first one found wins): - Strict marker: `;text;` (no space after first `;`, none before last `;`). |
