From ba45b9e12f090271fa2012e3899d6e7ae7d915a6 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sat, 29 Jun 2024 14:13:08 +0200 Subject: [PATCH] docs: general cleanups --- README.md | 78 +++++++++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 11c7b0db..9ba22ca1 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,46 @@ # neotest-golang -A Neotest adapter for running Go tests. +Reliable Neotest adapter for running Go tests in Neovim. neotest-golang ## ⭐️ Features - Supports all [Neotest usage](https://github.com/nvim-neotest/neotest#usage). -- Integrates with [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) for - debugging of tests using delve. +- Supports table tests and nested test functions (based on AST/tree-sitter + detection). +- DAP support with [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) + integration for debugging of tests using + [delve](https://github.com/go-delve/delve). +- Monorepo support (detect, run and debug tests in sub-projects). - Inline diagnostics. +- Custom `go test` argument support. - Works great with [andythigpen/nvim-coverage](https://github.com/andythigpen/nvim-coverage) for displaying coverage in the sign column (per-Go package, or per-test basis). -- Monorepo support (detect, run and debug tests in sub-projects). -- Supports table tests (relies on treesitter AST detection). -- Supports nested test functions. - -## 🚧 Work in progress - -This Neotest adapter is under heavy development and I'm dogfooding myself with -this project on a daily basis, as full-time Go developer. - -My next focus areas: -- [ ] Refactoring, polish and the addition of tests. -- [ ] Documentation around expanding new syntax support for table tests via AST - parsing. -- [ ] Add debug logging: - [neotest#422](https://github.com/nvim-neotest/neotest/discussions/422) -- [ ] Investigate ways to speed up test execution when executing tests in a - file. - -## 🏓 Background +
+Why a second Neotest adapter for Go? 🤔 -I've been using Neovim and Neotest with -[neotest-go](https://github.com/nvim-neotest/neotest-go) but I have stumbled -upon many problems which seem difficult to solve in the neotest-go codebase. +While using [neotest-go](https://github.com/nvim-neotest/neotest-go) I stumbled +upon many problems which seemed difficult to solve in that codebase. I have full respect for the time and efforts put in by the developer(s) of -neotest-go. I do not aim in any way to diminish their needs or efforts. - -However, I would like to see if, by building a Go adapter for Neotest from -scratch, if I can mitigate the issues I have found with neotest-go. - -### Neotest-go issues mitigated in neotest-golang - -- Test Output in JSON, making it difficult to read: - [neotest-go#52](https://github.com/nvim-neotest/neotest-go/issues/52) -- "Run nearest" runs all tests: - [neotest-go#83](https://github.com/nvim-neotest/neotest-go/issues/83) -- Running test suite doesn't work: - [neotest-go#89](https://github.com/nvim-neotest/neotest-go/issues/89) -- Diagnostics for table tests on the line of failure: - [neotest-go#75](https://github.com/nvim-neotest/neotest-go/issues/75) -- Support for Nested Subtests: - [neotest-go#74](https://github.com/nvim-neotest/neotest-go/issues/74) -- DAP support: - [neotest-go#12](https://github.com/nvim-neotest/neotest-go/issues/12) - -### Upstream/dependency issues found during development - -- Test output is printed undesirably: - [neotest#391](https://github.com/nvim-neotest/neotest/issues/391). This is - currently mitigated in neotest-golang by reading the neotest-written test - output file on disk, parsing it and then erasing its contents. +neotest-go. I do not aim in any way to diminish their needs or efforts. However, +I wanted to see if I could fix these issues by diving into the 🕳️🐇 of Neotest +and building my own adapter. Below is a list of neotest-go issues which are not +present in neotest-golang (this project): + +| Neotest-go issue | URL | +| -------------------------------------------------- | --------------------------------------------------------------------- | +| Test Output in JSON, making it difficult to read | [neotest-go#52](https://github.com/nvim-neotest/neotest-go/issues/52) | +| "Run nearest" runs all tests | [neotest-go#83](https://github.com/nvim-neotest/neotest-go/issues/83) | +| Running test suite doesn't work | [neotest-go#89](https://github.com/nvim-neotest/neotest-go/issues/89) | +| Diagnostics for table tests on the line of failure | [neotest-go#75](https://github.com/nvim-neotest/neotest-go/issues/75) | +| Support for Nested Subtests | [neotest-go#74](https://github.com/nvim-neotest/neotest-go/issues/74) | +| DAP support | [neotest-go#12](https://github.com/nvim-neotest/neotest-go/issues/12) | + +
## 🥸 Installation