Skip to content

yanskun/gotests.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/'

Releases

No releases published

Packages

No packages published

Languages