···5757 -- path to a directory containing custom test code templates
5858 template_dir = nil,
5959 -- switch table tests from using slice to map (with test name for the key)
6060- -- works only with gotests installed from develop branch
6160 named = false,
6261 },
6362 gotag = {
+4-19
doc/gopher.nvim.txt
···2222 `gopher.setup`({user_config})
2323Setup function. This method simply merges default config with opts table.
2424You can read more about configuration at |gopher.nvim-config|
2525-Calling this function is optional, if you ok with default settings. Look |gopher.nvim.config-defaults|
2525+Calling this function is optional, if you ok with default settings.
2626+See |gopher.nvim.config-defaults|
26272728Usage ~
2829`require("gopher").setup {}` (replace `{}` with your `config` table)
···3536Gopher.nvim implements most of its features using third-party tools.
3637To install these tools, you can run `:GoInstallDeps` command
3738or call `require("gopher").install_deps()` if you want to use lua api.
3939+By default dependencies will be installed asynchronously, to install them synchronously pass `{sync = true}` as an argument.
384039414042==============================================================================
···7779 ---@type string|nil
7880 template_dir = nil,
7981 -- switch table tests from using slice to map (with test name for the key)
8080- -- works only with gotests installed from develop branch
8182 named = false,
8283 },
8384 ---@class gopher.ConfigGoTag
···208209 *gopher.nvim-gotests-named*
209210210211You can enable named tests in the config if you prefer using named tests.
211211-But you must install `gotests@develop` because the stable version doesn't support this feature.
212212-213213->lua
214214- -- simply run go get in your shell:
215215- go install github.com/cweill/gotests/...@develop
216216-217217- -- if you want to install it within neovim, you can use one of this:
218218- -- if you choose to install gotests this way i reocmmend adding it to your `build` section in your |lazy.nvim|
219219-220220- vim.fn.jobstart("go install github.com/cweill/gotests/...@develop")
212212+See |gopher.nvim-config|.
221213222222- -- or if you want to use mason:
223223- require("mason-tool-installer").setup {
224224- ensure_installed = {
225225- { "gotests", version = "develop" },
226226- }
227227- }
228228-<
229214230215==============================================================================
231216------------------------------------------------------------------------------
-1
lua/gopher/config.lua
···5555 ---@type string|nil
5656 template_dir = nil,
5757 -- switch table tests from using slice to map (with test name for the key)
5858- -- works only with gotests installed from develop branch
5958 named = false,
6059 },
6160 ---@class gopher.ConfigGoTag
+1-18
lua/gopher/gotests.lua
···1919---@tag gopher.nvim-gotests-named
2020---@text
2121--- You can enable named tests in the config if you prefer using named tests.
2222---- But you must install `gotests@develop` because the stable version doesn't support this feature.
2323----
2424---- >lua
2525---- -- simply run go get in your shell:
2626---- go install github.com/cweill/gotests/...@develop
2727----
2828---- -- if you want to install it within neovim, you can use one of this:
2929---- -- if you choose to install gotests this way i reocmmend adding it to your `build` section in your |lazy.nvim|
3030----
3131---- vim.fn.jobstart("go install github.com/cweill/gotests/...@develop")
3232----
3333---- -- or if you want to use mason:
3434---- require("mason-tool-installer").setup {
3535---- ensure_installed = {
3636---- { "gotests", version = "develop" },
3737---- }
3838---- }
3939---- <
2222+--- See |gopher.nvim-config|.
40234124local c = require "gopher.config"
4225local ts_utils = require "gopher._utils.ts"
+3-1
lua/gopher/init.lua
···1919---@tag gopher.nvim-setup
2020---@text Setup function. This method simply merges default config with opts table.
2121--- You can read more about configuration at |gopher.nvim-config|
2222---- Calling this function is optional, if you ok with default settings. Look |gopher.nvim.config-defaults|
2222+--- Calling this function is optional, if you ok with default settings.
2323+--- See |gopher.nvim.config-defaults|
2324---
2425---@usage `require("gopher").setup {}` (replace `{}` with your `config` table)
2526---@param user_config gopher.Config
···3435---@text Gopher.nvim implements most of its features using third-party tools.
3536--- To install these tools, you can run `:GoInstallDeps` command
3637--- or call `require("gopher").install_deps()` if you want to use lua api.
3838+--- By default dependencies will be installed asynchronously, to install them synchronously pass `{sync = true}` as an argument.
3739gopher.install_deps = require("gopher.installer").install_deps
38403941gopher.impl = require("gopher.impl").impl
+5-6
lua/gopher/installer.lua
···55local installer = {}
6677local urls = {
88- gomodifytags = "github.com/fatih/gomodifytags",
99- impl = "github.com/josharian/impl",
1010- gotests = "github.com/cweill/gotests/...",
1111- iferr = "github.com/koron/iferr",
88+ gomodifytags = "github.com/fatih/gomodifytags@latest",
99+ impl = "github.com/josharian/impl@latest",
1010+ gotests = "github.com/cweill/gotests/...@develop",
1111+ iferr = "github.com/koron/iferr@latest",
1212}
13131414---@param opt vim.SystemCompleted
···4040---@param opts? {sync:boolean}
4141function installer.install_deps(opts)
4242 opts = opts or {}
4343- for pkg, _ in pairs(urls) do
4444- local url = urls[pkg] .. "@latest"
4343+ for url, _ in pairs(urls) do
4544 if opts.sync then
4645 install_sync(url)
4746 else