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 Mar 18, 2024
1 parent 1b15d60 commit 9532fff
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 4,988 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,28 +101,28 @@ 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/V13Axel/neotest-pest) |
| pest | [neotest-pest](https://github.com/V13Axel/neotest-pest) |
| rust (treesitter) | [neotest-rust](https://github.com/rouge8/neotest-rust) |
| rust (LSP) | [rustaceanvim](https://github.com/mrcjkb/rustaceanvim) |
| 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 @@ -156,10 +160,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 @@ -227,7 +230,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 9532fff

Please sign in to comment.