refactor(docs): change the order in generated file

This commit is contained in:
Smirnov Oleksandr 2024-03-30 14:31:35 +02:00
parent 9edc4604e5
commit 801913fe06
4 changed files with 23 additions and 21 deletions

View file

@ -46,4 +46,4 @@ tasks:
--headless \ --headless \
-u "./scripts/minimal_init.lua" \ -u "./scripts/minimal_init.lua" \
-c "luafile ./scripts/doc_gen.lua" \ -c "luafile ./scripts/doc_gen.lua" \
-c "qa!" -c ":qa!"

View file

@ -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* *gopher.nvim-table-of-contents*
Table of Contents Table of Contents
Setup....................................................|gopher.nvim-setup|
Configuration...........................................|gopher.nvim-config| 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,20 +64,13 @@ You can look at default options |gopher.nvim-config-defaults|
}, },
} }
< <
Class Class ~
{gopher.Config} {gopher.Config}
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*gopher.nvim-config-setup* *config.setup()*
`config.setup`({user_config}) `config.setup`({user_config})
Setup function. This method simply merges default configs with opts table. Parameters ~
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
{user_config} `(optional)` gopher.Config {user_config} `(optional)` gopher.Config

View file

@ -62,14 +62,6 @@ local default_config = {
---@private ---@private
local _config = default_config 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 ---@param user_config? gopher.Config
function config.setup(user_config) function config.setup(user_config)
_config = vim.tbl_deep_extend("force", default_config, user_config or {}) _config = vim.tbl_deep_extend("force", default_config, user_config or {})

View file

@ -14,6 +14,13 @@ local tests = require "gopher.gotests"
local gocmd = require("gopher._utils.runner.gocmd").run local gocmd = require("gopher._utils.runner.gocmd").run
local gopher = {} 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.setup = require("gopher.config").setup
gopher.install_deps = require("gopher.installer").install_deps gopher.install_deps = require("gopher.installer").install_deps
gopher.impl = require("gopher.impl").impl gopher.impl = require("gopher.impl").impl