Skip to content

vcraescu/gotest.nvim

Repository files navigation

gotest

Lua Neovim

Install

Dependencies

This plugin requires nvim-treesitter with the Go parser installed:

require('nvim-treesitter').install({ "go" })

Lazy

return {
  "vcraescu/gotest.nvim",
  dependencies = { "nvim-treesitter/nvim-treesitter" },
  cmd = { "GoTestNearest", "GoTestRetry" },
  opts = {}
}

Default config

{
  output = {
     focus = {
       fail = true, -- focus test results on fail
       success = false, -- focus test results on success
     },
     height = 15, -- height of the quickfix pane
     show = {
       fail = true,
       success = true,
     },
  },
  timeout = 30, -- test run timeout in seconds
  disable_test_cache = false, -- disable go test cache
  diagnostics = {
     enabled = true, -- show diagnostics
  },
}

Commands

Run the test nearest to the cursor:

:GoTestNearest

Rerun the last test command:

:GoTestRetry

About

Neovim plugin to run golang tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages