Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.19 KB

README.md

File metadata and controls

53 lines (38 loc) · 1.19 KB

gotests.nvim

There is gotests-vim as a plugin to handle gotests with vim.

This is a Lua rewrite for Neovim.

Required

Installation

Gotests-vim requires gotests to be available in your $PATH. Alternatively you can provide path to gotests using g:gotests_bin setting.

{
  "yanskun/gotests.nvim",
  ft = "go",
  config = function()
    require("gotests").setup()
  end,
},
use {
  'yanskun/gotests.nvim',
  ft = 'go',
  config = function()
    require('gotests').setup()
  end
}

Usage

Command Description
:GoTests generate tests for functions at the current line or functions selected in visual mode.
:GoTestsAll generate tests for all functions and methods

Settings

If you want you can set path to your gotests binary if it's not in your path, for example:

let g:gotests_bin = '/home/user/go/bin/gotests'

You can also set custom template directory:

let g:gotests_template_dir = '/home/user/templates/'