From 3ee19139a95441a3ce10690377de8f453c7aec3f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 3 Sep 2025 16:41:46 +0300 Subject: lsp: add 'Hexai: implement unit test' code action for Go - Generate or append tests to _test.go - Jump to generated test via showDocument (command + server-initiated) - Document the feature in docs/go-unit-tests.md - Prefix action titles with 'Hexai: ' - Bump version to 0.4.1 --- docs/usage-examples.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/usage-examples.md') diff --git a/docs/usage-examples.md b/docs/usage-examples.md index 5a80b18..3e96ade 100644 --- a/docs/usage-examples.md +++ b/docs/usage-examples.md @@ -65,6 +65,7 @@ Operate on the current selection in Helix: - Rewrite selection: finds the first instruction inside the selection and rewrites accordingly. - Resolve diagnostics: gathers only diagnostics overlapping the selection and fixes them by editing the selected code; diagnostics outside the selection are not changed. +- Implement unit test (Go): when editing a `.go` file, adds a code action to generate a unit test for the function under the cursor. If `_test.go` exists, appends a new `Test*`; otherwise creates the test file with `package` and `import "testing"`. Instruction sources (first match wins): -- cgit v1.2.3