docs: update (#103)
* chore: add @dochide annotation - it's easier to distinguish @private and something i dont want to see in docs * docs: update * refactor: move thing out to utils * fix: lua-ls error * fixup! refactor: move thing out to utils * docs: update
This commit is contained in:
parent
592fe82760
commit
c0b2834652
13 changed files with 107 additions and 112 deletions
|
|
@ -1,17 +1,9 @@
|
|||
---@toc_entry Configuration
|
||||
---@tag gopher.nvim-config
|
||||
---@text config it is the place where you can configure the plugin.
|
||||
--- also this is optional is you're ok with default settings.
|
||||
--- You can look at default options |gopher.nvim-config-defaults|
|
||||
|
||||
---@type gopher.Config
|
||||
---@private
|
||||
local config = {}
|
||||
|
||||
---@tag gopher.nvim-config.ConfigGoTagTransform
|
||||
---@text Possible values for |gopher.Config|.gotag.transform:
|
||||
---
|
||||
---@private
|
||||
---@dochide
|
||||
---@alias gopher.ConfigGoTagTransform
|
||||
---| "snakecase" "GopherUser" -> "gopher_user"
|
||||
---| "camelcase" "GopherUser" -> "gopherUser"
|
||||
|
|
@ -20,15 +12,11 @@ local config = {}
|
|||
---| "titlecase" "GopherUser" -> "Gopher User"
|
||||
---| "keep" keeps the original field name
|
||||
|
||||
--minidoc_replace_start {
|
||||
|
||||
---@tag gopher.nvim-config-defaults
|
||||
---@toc_entry Config
|
||||
---@tag gopher.nvim-config
|
||||
---@eval return MiniDoc.afterlines_to_code(MiniDoc.current.eval_section)
|
||||
---
|
||||
---@class gopher.Config
|
||||
local default_config = {
|
||||
--minidoc_replace_end
|
||||
|
||||
-- log level, you might consider using DEBUG or TRACE for debugging the plugin
|
||||
---@type number
|
||||
log_level = vim.log.levels.INFO,
|
||||
|
|
@ -73,7 +61,7 @@ local default_config = {
|
|||
--minidoc_afterlines_end
|
||||
|
||||
---@type gopher.Config
|
||||
---@private
|
||||
---@dochide
|
||||
local _config = default_config
|
||||
|
||||
-- I am kinda secret so don't tell anyone about me even dont use me
|
||||
|
|
@ -84,7 +72,7 @@ local _config = default_config
|
|||
_config.___plugin_name = "gopher.nvim" ---@diagnostic disable-line: inject-field
|
||||
|
||||
---@param user_config? gopher.Config
|
||||
---@private
|
||||
---@dochide
|
||||
function config.setup(user_config)
|
||||
vim.validate { user_config = { user_config, "table", true } }
|
||||
|
||||
|
|
@ -117,6 +105,6 @@ setmetatable(config, {
|
|||
end,
|
||||
})
|
||||
|
||||
---@dochide
|
||||
---@return gopher.Config
|
||||
---@private
|
||||
return config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue