![]() Show cheat.sh for api in neovim new buffer. You can also add other unmapped arguments after the -a or -args flag GoTest -a mock=true GoCheat You can add available arguments with long name or character flag e.g. Run test for current folder with -tags yourtag option Run test for current func with -tags yourtag option Support table based unit test auto generate, parse current function/method name using treesitter command Provided wrapper for gobulild/test etc with async makeĪlso suggest to use vim-test, which can run running tests on different % will expand to current file path, e.g.args: if multiple args is provided, you need toconcatenate it with '\ ', e.g.tags: if // build tags exist it will be added automatically.if package_url not provided, will check current line is a valid package url or not, if it is valid, will.t : toggle, -r: remove signs, -R remove sings from all files, -m show metricsĮ.g: GoCoverage -p -coverpkg 'yourpackagename' Go test -coverprofile (only tests package for current buffer) Go test packagepath -tags=yourtags other_args GoTest package_path -t yourtags other_args Run gotestsum and show result in side panel Should be installed the first time you use it.Īlso Run TSInstall go to install the go parser if not installed yet. The dependency treesitter (and optionally, treesitter-objects) Use your favorite package manager to install. Treesitter highlight injection: go.nvim included a treesitter highlight injection for SQL and json.luasnip: go.nvim included a feature rich luasnips you definitally need to try.Inlay hints: gopls (version 0.9.x or greater) inlay hints.Smart build tag detection when debug/run tests (e.g. ![]() GoCheat get go cheatsheet from cheat.sh.Code refactor made easy: GoFixPlural, FixStruct, FixSwitch, Add comment, IfErr, ModTidy, GoGet, extract function/block with codeactions.Test with ginkgo, richgo inside floaterm (to enable floaterm, a has to be installed).Go to alternative go file (between test and source).This feature is unique and can help you suppress golint Comments: Add autodocument for your package/function/struct/interface.CodeLens : gopls codelens and codelens action support.Code format: Supports LSP format and GoFmt(with golines).Add and remove tag for struct with tag modify(gomodifytags).Unit test: generate unit test framework with gotests.Go adapter included, zero config for your debug setup. Test coverage: run test coverage and show coverage sign and function metrics. ![]()
0 Comments
Leave a Reply. |