feat(config): add types annotation (#21)
This commit is contained in:
parent
f835464d7f
commit
e8fe6c5b15
1 changed files with 13 additions and 1 deletions
|
|
@ -1,4 +1,16 @@
|
||||||
|
---@class Config
|
||||||
|
---@field commands ConfigCommands
|
||||||
|
|
||||||
|
---@class ConfigCommands
|
||||||
|
---@field go string
|
||||||
|
---@field gomodifytags string
|
||||||
|
---@field gotests string
|
||||||
|
---@field impl string
|
||||||
|
---@field iferr string
|
||||||
|
---@field dlv string
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
|
---@type Config
|
||||||
config = {
|
config = {
|
||||||
---set custom commands for tools
|
---set custom commands for tools
|
||||||
commands = {
|
commands = {
|
||||||
|
|
@ -13,7 +25,7 @@ local M = {
|
||||||
}
|
}
|
||||||
|
|
||||||
---Plugin setup function
|
---Plugin setup function
|
||||||
---@param opts table user options
|
---@param opts Config user config
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
M.config = vim.tbl_deep_extend("force", M.config, opts or {})
|
M.config = vim.tbl_deep_extend("force", M.config, opts or {})
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue