diff --git a/Taskfile.yml b/Taskfile.yml index 83ddba3..74f19c9 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -46,4 +46,4 @@ tasks: --headless \ -u "./scripts/minimal_init.lua" \ -c "luafile ./scripts/doc_gen.lua" \ - -c "qa!" + -c ":qa!" diff --git a/doc/gopher.nvim.txt b/doc/gopher.nvim.txt index b9e4de6..ef49f4c 100644 --- a/doc/gopher.nvim.txt +++ b/doc/gopher.nvim.txt @@ -8,8 +8,18 @@ It's not an LSP tool, the main goal of this plugin is add go tooling support in ------------------------------------------------------------------------------ *gopher.nvim-table-of-contents* Table of Contents + Setup....................................................|gopher.nvim-setup| Configuration...........................................|gopher.nvim-config| - Setup.............................................|gopher.nvim-config-setup| + +------------------------------------------------------------------------------ + *gopher.nvim-setup* + `gopher.setup` +Setup function. This method simply merges default configs 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| + +Usage ~ +`require("gopher").setup {}` (replace `{}` with your `config` table) ============================================================================== @@ -54,21 +64,14 @@ You can look at default options |gopher.nvim-config-defaults| }, } < -Class +Class ~ {gopher.Config} ------------------------------------------------------------------------------ - *gopher.nvim-config-setup* + *config.setup()* `config.setup`({user_config}) -Setup function. This method simply merges default configs 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| - -Usage -`require("gopher").setup {}` (replace `{}` with your `config` table) - -Parameters +Parameters ~ {user_config} `(optional)` gopher.Config - vim:tw=78:ts=8:noet:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: \ No newline at end of file diff --git a/lua/gopher/config.lua b/lua/gopher/config.lua index d767200..c0a0dcc 100644 --- a/lua/gopher/config.lua +++ b/lua/gopher/config.lua @@ -62,14 +62,6 @@ local default_config = { ---@private local _config = default_config ----@toc_entry Setup ----@tag gopher.nvim-setup ----@text Setup function. This method simply merges default configs 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| ---- ----@usage `require("gopher").setup {}` (replace `{}` with your `config` table) ---- ---@param user_config? gopher.Config function config.setup(user_config) _config = vim.tbl_deep_extend("force", default_config, user_config or {}) diff --git a/lua/gopher/init.lua b/lua/gopher/init.lua index 1919cd2..eda5018 100644 --- a/lua/gopher/init.lua +++ b/lua/gopher/init.lua @@ -14,6 +14,13 @@ local tests = require "gopher.gotests" local gocmd = require("gopher._utils.runner.gocmd").run local gopher = {} +---@toc_entry Setup +---@tag gopher.nvim-setup +---@text Setup function. This method simply merges default configs 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| +--- +---@usage `require("gopher").setup {}` (replace `{}` with your `config` table) gopher.setup = require("gopher.config").setup gopher.install_deps = require("gopher.installer").install_deps gopher.impl = require("gopher.impl").impl