GithubHelp home page GithubHelp logo

gott.nvim's Introduction

gott.nvim

Exec go test under cursor easily.

Screenshot

Requirements

Install: go install github.com/sshelll/gott/v2@latest
**Note: the version of gott should be greater than v2.0.0, **

which means you should not use go install github.com/sshelll/gott@latest

Install: check https://github.com/rcarriga/nvim-notify for more details.

This plug allows you run test async, check https://github.com/tpope/vim-dispatch for more details.

Install

Use your nvim plug manager.

Such as: Plug 'sshelll/gott.nvim'

Commands

  1. Gott

​ Run go test under cursor. For example:

:Gott
:Gott -v
:Gott -v -race
:Gott -vet=off -race
  1. GottFile

​ Run all go tests of the current buffer. For example:

:GottFile
:GottFile -v
:GottFile -v -race
:GottFile -vet=off -race
  1. GottClear

​ Clear all the notifications.

  1. GottAsync

    Run go test under cursor async. You have to install vim-dispatch first.

  2. GottFileAsync

    Run all go tests of the current buffer async. You have to install vim-dispatch first.

Configuration

require('gott').setup{
    timeout = 3000,    -- try to close go test result notification after 3s.
    keep = function () -- decide whether to keep the notification after timeout(3s).
        return false
    end,
    render = 'default', -- default / minimal / simple / compact, controls the notification style.
    test_args = '-v -race', -- these args will be passed to go test command at any time.
}

The default conf is:

require('gott').setup{
    keep = function () -- keep the notification after timeout, which means the notification window will not be closed.
        return true    -- if you want to close them, just call ':GottClear'.
    end,
    render = 'default',
    test_args = '-v -vet=off',
}

gott.nvim's People

Contributors

sshelll avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.