docs: update docs
This commit is contained in:
parent
62989c535e
commit
0ad832b120
4 changed files with 23 additions and 4 deletions
|
|
@ -11,6 +11,7 @@ Table of Contents
|
|||
Setup....................................................|gopher.nvim-setup|
|
||||
Install dependencies..............................|gopher.nvim-install-deps|
|
||||
Configuration...........................................|gopher.nvim-config|
|
||||
Commands..............................................|gopher.nvim-commands|
|
||||
Modify struct tags.................................|gopher.nvim-struct-tags|
|
||||
Auto implementation of interface methods..................|gopher.nvim-impl|
|
||||
Generating unit tests boilerplate......................|gopher.nvim-gotests|
|
||||
|
|
@ -36,7 +37,8 @@ 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.
|
||||
By default dependencies will be installed asynchronously,
|
||||
to install them synchronously pass `{sync = true}` as an argument.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
|
@ -99,6 +101,14 @@ Class ~
|
|||
{gopher.Config}
|
||||
|
||||
|
||||
==============================================================================
|
||||
------------------------------------------------------------------------------
|
||||
*gopher.nvim-commands*
|
||||
|
||||
If don't want to automatically register plugins' commands,
|
||||
you can set `vim.g.gopher_register_commands` to `false`, before loading the plugin.
|
||||
|
||||
|
||||
==============================================================================
|
||||
------------------------------------------------------------------------------
|
||||
*gopher.nvim-struct-tags*
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ 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.
|
||||
--- 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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---@toc_entry Commands
|
||||
---@tag gopher.nvim-commands
|
||||
---@text
|
||||
--- If don't want to automatically register plugins' commands,
|
||||
--- you can set `vim.g.gopher_register_commands` to `false`, before loading the plugin.
|
||||
|
||||
if vim.g.gopher_register_commands == false then
|
||||
return
|
||||
end
|
||||
|
|
@ -5,6 +11,7 @@ end
|
|||
---@param name string
|
||||
---@param fn fun(args: table)
|
||||
---@param nargs? number|"*"|"?"
|
||||
---@private
|
||||
local function cmd(name, fn, nargs)
|
||||
nargs = nargs or 0
|
||||
vim.api.nvim_create_user_command(name, fn, { nargs = nargs })
|
||||
|
|
@ -35,7 +42,7 @@ cmd("GoInstallDepsSync", function()
|
|||
require("gopher").install_deps { sync = true }
|
||||
end)
|
||||
|
||||
--- :GoTag
|
||||
-- :GoTag
|
||||
cmd("GoTagAdd", function(opts)
|
||||
require("gopher").tags.add(unpack(opts.fargs))
|
||||
end, "*")
|
||||
|
|
@ -48,7 +55,7 @@ cmd("GoTagClear", function()
|
|||
require("gopher").tags.clear()
|
||||
end)
|
||||
|
||||
--- :GoTest
|
||||
-- :GoTest
|
||||
cmd("GoTestAdd", function()
|
||||
require("gopher").test.add()
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ end
|
|||
local files = {
|
||||
"lua/gopher/init.lua",
|
||||
"lua/gopher/config.lua",
|
||||
"plugin/gopher.lua",
|
||||
"lua/gopher/struct_tags.lua",
|
||||
"lua/gopher/impl.lua",
|
||||
"lua/gopher/gotests.lua",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue