Skip to content

Commit

Permalink
feat: use external nio
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Requires https://github.com/nvim-neotest/nvim-nio to be
installed
  • Loading branch information
rcarriga committed Dec 22, 2023
1 parent 20e6877 commit 39bb0f5
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 4,962 deletions.
1 change: 1 addition & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
git clone --depth 1 https://github.com/nvim-neotest/nvim-nio ~/.local/share/nvim/site/pack/vendor/start/nvim-nio
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ See `:h neotest` for details on neotest is designed and how to interact with it

[![LuaRocks](https://img.shields.io/luarocks/v/nvim-neotest/neotest?logo=lua&color=purple)](https://luarocks.org/modules/nvim-neotest/neotest)

Neotest uses [plenary.nvim](https://github.com/nvim-lua/plenary.nvim/).
Neotest uses [nvim-nio](https://github.com/nvim-neotest/nvim-nio) and [plenary.nvim](https://github.com/nvim-lua/plenary.nvim/).

Most adapters will also require [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter).

Expand All @@ -46,17 +46,19 @@ Install with your favourite package manager alongside nvim-dap
```vim
call dein#add("nvim-lua/plenary.nvim")
call dein#add("antoinemadec/FixCursorHold.nvim")
call dein#add("nvim-neotest/neotest")
call dein#add("nvim-treesitter/nvim-treesitter")
call dein#add("nvim-neotest/nvim-nio")
call dein#add("nvim-neotest/neotest")
```

[**vim-plug**](https://github.com/junegunn/vim-plug)

```vim
Plug 'nvim-lua/plenary.nvim'
Plug 'antoinemadec/FixCursorHold.nvim'
Plug 'nvim-neotest/neotest'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'nvim-neotest/nvim-nio'
Plug 'nvim-neotest/neotest'
```

[packer.nvim](https://github.com/wbthomason/packer.nvim)
Expand All @@ -65,6 +67,7 @@ Plug 'nvim-treesitter/nvim-treesitter'
use {
"nvim-neotest/neotest",
requires = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter"
Expand All @@ -75,9 +78,10 @@ use {
[lazy.nvim](https://github.com/folke/lazy.nvim)

```lua
{
{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter"
Expand All @@ -97,27 +101,27 @@ See the adapter's documentation for their specific setup instructions.
| plenary | [neotest-plenary](https://github.com/nvim-neotest/neotest-plenary) |
| go | [neotest-go](https://github.com/akinsho/neotest-go) |
| jest | [neotest-jest](https://github.com/haydenmeade/neotest-jest) |
| vitest | [neotest-vitest](https://github.com/marilari88/neotest-vitest) |
| vitest | [neotest-vitest](https://github.com/marilari88/neotest-vitest) |
| playwright | [neotest-playwright](https://github.com/thenbe/neotest-playwright) |
| rspec | [neotest-rspec](https://github.com/olimorris/neotest-rspec) |
| minitest | [neotest-minitest](https://github.com/zidhuss/neotest-minitest) |
| dart, flutter | [neotest-dart](https://github.com/sidlatau/neotest-dart) |
| testthat | [neotest-testthat](https://github.com/shunsambongi/neotest-testthat) |
| phpunit | [neotest-phpunit](https://github.com/olimorris/neotest-phpunit) |
| pest | [neotest-pest](https://github.com/theutz/neotest-pest) |
| pest | [neotest-pest](https://github.com/theutz/neotest-pest) |
| rust | [neotest-rust](https://github.com/rouge8/neotest-rust) |
| elixir | [neotest-elixir](https://github.com/jfpedroza/neotest-elixir) |
| dotnet | [neotest-dotnet](https://github.com/Issafalcon/neotest-dotnet) |
| scala | [neotest-scala](https://github.com/stevanmilic/neotest-scala) |
| haskell | [neotest-haskell](https://github.com/mrcjkb/neotest-haskell) |
| deno | [neotest-deno](https://github.com/MarkEmmons/neotest-deno) |
| java | [neotest-java](https://github.com/rcasia/neotest-java) |
| haskell | [neotest-haskell](https://github.com/mrcjkb/neotest-haskell) |
| deno | [neotest-deno](https://github.com/MarkEmmons/neotest-deno) |
| java | [neotest-java](https://github.com/rcasia/neotest-java) |
| foundry | [neotest-foundry](https://github.com/llllvvuu/neotest-foundry) |
| zig | [neotest-zig](https://github.com/lawrence-laz/neotest-zig) |
| c++ (google test) | [neotest-gtest](https://github.com/alfaix/neotest-gtest) |
| zig | [neotest-zig](https://github.com/lawrence-laz/neotest-zig) |
| c++ (google test) | [neotest-gtest](https://github.com/alfaix/neotest-gtest) |
| gradle | [neotest-gradle](https://github.com/weilbith/neotest-gradle) |
| bash | [neotest-bash](https://github.com/rcasia/neotest-bash) |
| hardhat | [neotest-hardhat](https://github.com/TheSnakeWitcher/hardhat.nvim) |
| bash | [neotest-bash](https://github.com/rcasia/neotest-bash) |
| hardhat | [neotest-hardhat](https://github.com/TheSnakeWitcher/hardhat.nvim) |

For any runner without an adapter you can use [neotest-vim-test](https://github.com/nvim-neotest/neotest-vim-test) which supports any runner that vim-test supports.
The vim-test adapter does not support some of the more advanced features such as error locations or per-test output.
Expand Down Expand Up @@ -155,10 +159,9 @@ require("neodev").setup({

The default icons use [codicons](https://github.com/microsoft/vscode-codicons).
It's recommended to use this [fork](https://github.com/ChristianChiarulli/neovim-codicons) which fixes alignment issues
for the terminal. If your terminal doesn't support font fallback and you need to have icons included in your font, you can patch it via [Font Patcher](https://github.com/ryanoasis/nerd-fonts#option-8-patch-your-own-font).
for the terminal. If your terminal doesn't support font fallback and you need to have icons included in your font, you can patch it via [Font Patcher](https://github.com/ryanoasis/nerd-fonts#option-8-patch-your-own-font).
There is a simple step by step guide [here](https://github.com/mortepau/codicons.nvim#how-to-patch-fonts).


## Usage

The interface for using neotest is very simple.
Expand Down Expand Up @@ -226,7 +229,6 @@ Displays per-test output
Records all output of tests over time in a single window
![image](https://user-images.githubusercontent.com/24252670/201535290-d726c781-a780-4318-b595-a10832b9f191.png)


### Summary Window

`:h neotest.summary`
Expand Down
Loading

0 comments on commit 39bb0f5

Please sign in to comment.