diff --git a/README.md b/README.md index a6f59db..1dfff49 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,6 @@ require("gopher").setup { -- path to a directory containing custom test code templates template_dir = nil, -- switch table tests from using slice to map (with test name for the key) - -- works only with gotests installed from develop branch named = false, }, gotag = { diff --git a/doc/gopher.nvim.txt b/doc/gopher.nvim.txt index 377a4f4..88bc449 100644 --- a/doc/gopher.nvim.txt +++ b/doc/gopher.nvim.txt @@ -22,7 +22,8 @@ Table of Contents `gopher.setup`({user_config}) Setup function. This method simply merges default config with opts table. You can read more about configuration at |gopher.nvim-config| -Calling this function is optional, if you ok with default settings. Look |gopher.nvim.config-defaults| +Calling this function is optional, if you ok with default settings. +See |gopher.nvim.config-defaults| Usage ~ `require("gopher").setup {}` (replace `{}` with your `config` table) @@ -35,6 +36,7 @@ Parameters ~ Gopher.nvim implements most of its features using third-party tools. To install these tools, you can run `:GoInstallDeps` command or call `require("gopher").install_deps()` if you want to use lua api. +By default dependencies will be installed asynchronously, to install them synchronously pass `{sync = true}` as an argument. ============================================================================== @@ -77,7 +79,6 @@ You can look at default options |gopher.nvim-config-defaults| ---@type string|nil template_dir = nil, -- switch table tests from using slice to map (with test name for the key) - -- works only with gotests installed from develop branch named = false, }, ---@class gopher.ConfigGoTag @@ -207,25 +208,8 @@ More details about templates can be found at: https://github.com/cweill/gotests ------------------------------------------------------------------------------ *gopher.nvim-gotests-named* -You can enable named tests in the config if you prefer using named tests. -But you must install `gotests@develop` because the stable version doesn't support this feature. +You can enable named tests in the config if you prefer using named tests. See |gopher.nvim-config|. ->lua - -- simply run go get in your shell: - go install github.com/cweill/gotests/...@develop - - -- if you want to install it within neovim, you can use one of this: - -- if you choose to install gotests this way i reocmmend adding it to your `build` section in your |lazy.nvim| - - vim.fn.jobstart("go install github.com/cweill/gotests/...@develop") - - -- or if you want to use mason: - require("mason-tool-installer").setup { - ensure_installed = { - { "gotests", version = "develop" }, - } - } -< ============================================================================== ------------------------------------------------------------------------------ @@ -243,4 +227,4 @@ Execute `:GoCmt` to generate a comment for the current function/method/struct/et This module provides a way to generate comments for Go code. - vim:tw=78:ts=8:noet:ft=help:norl: \ No newline at end of file + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/lua/gopher/config.lua b/lua/gopher/config.lua index 7c67773..74cbff3 100644 --- a/lua/gopher/config.lua +++ b/lua/gopher/config.lua @@ -55,7 +55,6 @@ local default_config = { ---@type string|nil template_dir = nil, -- switch table tests from using slice to map (with test name for the key) - -- works only with gotests installed from develop branch named = false, }, ---@class gopher.ConfigGoTag diff --git a/lua/gopher/gotests.lua b/lua/gopher/gotests.lua index deab8b3..cd47f60 100644 --- a/lua/gopher/gotests.lua +++ b/lua/gopher/gotests.lua @@ -18,25 +18,7 @@ ---@tag gopher.nvim-gotests-named ---@text ---- You can enable named tests in the config if you prefer using named tests. ---- But you must install `gotests@develop` because the stable version doesn't support this feature. ---- ---- >lua ---- -- simply run go get in your shell: ---- go install github.com/cweill/gotests/...@develop ---- ---- -- if you want to install it within neovim, you can use one of this: ---- -- if you choose to install gotests this way i reocmmend adding it to your `build` section in your |lazy.nvim| ---- ---- vim.fn.jobstart("go install github.com/cweill/gotests/...@develop") ---- ---- -- or if you want to use mason: ---- require("mason-tool-installer").setup { ---- ensure_installed = { ---- { "gotests", version = "develop" }, ---- } ---- } ---- < +--- You can enable named tests in the config if you prefer using named tests. See |gopher.nvim-config|. local c = require "gopher.config" local ts_utils = require "gopher._utils.ts" diff --git a/lua/gopher/init.lua b/lua/gopher/init.lua index bb9888b..e1d136c 100644 --- a/lua/gopher/init.lua +++ b/lua/gopher/init.lua @@ -19,7 +19,8 @@ local gopher = {} ---@tag gopher.nvim-setup ---@text Setup function. This method simply merges default config with opts table. --- You can read more about configuration at |gopher.nvim-config| ---- Calling this function is optional, if you ok with default settings. Look |gopher.nvim.config-defaults| +--- Calling this function is optional, if you ok with default settings. +--- See |gopher.nvim.config-defaults| --- ---@usage `require("gopher").setup {}` (replace `{}` with your `config` table) ---@param user_config gopher.Config @@ -34,6 +35,7 @@ end ---@text Gopher.nvim implements most of its features using third-party tools. --- To install these tools, you can run `:GoInstallDeps` command --- or call `require("gopher").install_deps()` if you want to use lua api. +--- By default dependencies will be installed asynchronously, to install them synchronously pass `{sync = true}` as an argument. gopher.install_deps = require("gopher.installer").install_deps gopher.impl = require("gopher.impl").impl