add ability for setting custom tools options (#44)
* feat(gotests): add custom templates support * feat(struct_tags): add support for custom `transform` option
This commit is contained in:
parent
2e89cea6f3
commit
e0a3e70e48
3 changed files with 36 additions and 4 deletions
|
|
@ -1,6 +1,14 @@
|
|||
---@type gopher.Config
|
||||
local config = {}
|
||||
|
||||
---@alias gopher.ConfigGoTagTransform
|
||||
---| "snakecase" "GopherUser" -> "gopher_user"
|
||||
---| "camelcase" "GopherUser" -> "gopherUser"
|
||||
---| "lispcase" "GopherUser" -> "gopher-user"
|
||||
---| "pascalcase" "GopherUser" -> "GopherUser"
|
||||
---| "titlecase" "GopherUser" -> "Gopher User"
|
||||
---| "keep" keeps the original field name
|
||||
|
||||
---@class gopher.Config
|
||||
local default_config = {
|
||||
---@class gopher.ConfigCommand
|
||||
|
|
@ -12,6 +20,19 @@ local default_config = {
|
|||
iferr = "iferr",
|
||||
dlv = "dlv",
|
||||
},
|
||||
---@class gopjer.ConfigGotests
|
||||
gotests = {
|
||||
-- gotests doesn't have template named "default" so this plugin uses "default" to set the default template
|
||||
template = "default",
|
||||
-- path to a directory containing custom test code templates
|
||||
---@type string|nil
|
||||
template_dir = nil,
|
||||
},
|
||||
---@class gopher.ConfigGoTag
|
||||
gotag = {
|
||||
---@type gopher.ConfigGoTagTransform
|
||||
transform = "snakecase",
|
||||
},
|
||||
}
|
||||
|
||||
---@type gopher.Config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue