feat(rb) Add support for tomdoc
This commit is contained in:
@@ -7,7 +7,7 @@ local template = {}
|
|||||||
|
|
||||||
template.parent = {
|
template.parent = {
|
||||||
func = { "method" },
|
func = { "method" },
|
||||||
class = { "class" },
|
class = { "class", "module" },
|
||||||
type = { "call" },
|
type = { "call" },
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ template.data = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
class = {
|
class = {
|
||||||
["class"] = {
|
["class|module"] = {
|
||||||
["0"] = {
|
["0"] = {
|
||||||
extract = function()
|
extract = function()
|
||||||
return {}
|
return {}
|
||||||
@@ -72,6 +72,6 @@ template.data = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
template.template = _template:add_default_annotation("yard"):add_annotation("rdoc")
|
template.template = _template:add_default_annotation("yard"):add_annotation("rdoc"):add_annotation("tomdoc")
|
||||||
|
|
||||||
return template
|
return template
|
||||||
|
|||||||
@@ -216,6 +216,8 @@ end
|
|||||||
---
|
---
|
||||||
--- Note: We will only document `major` and `minor` versions, not `patch` ones.
|
--- Note: We will only document `major` and `minor` versions, not `patch` ones.
|
||||||
---
|
---
|
||||||
|
--- ## 2.5.0~
|
||||||
|
--- - Ruby: Add support for `tomdoc` (http://tomdoc.org)
|
||||||
--- ## 2.4.0~
|
--- ## 2.4.0~
|
||||||
--- - Improve godoc template (#75)
|
--- - Improve godoc template (#75)
|
||||||
--- ## 2.3.0~
|
--- ## 2.3.0~
|
||||||
@@ -236,7 +238,7 @@ end
|
|||||||
--- with multiple annotation conventions.
|
--- with multiple annotation conventions.
|
||||||
---@tag neogen-changelog
|
---@tag neogen-changelog
|
||||||
---@toc_entry Changes in neogen plugin
|
---@toc_entry Changes in neogen plugin
|
||||||
neogen.version = "2.4.0"
|
neogen.version = "2.5.0"
|
||||||
--minidoc_afterlines_end
|
--minidoc_afterlines_end
|
||||||
|
|
||||||
return neogen
|
return neogen
|
||||||
|
|||||||
8
lua/neogen/templates/tomdoc.lua
Normal file
8
lua/neogen/templates/tomdoc.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
local i = require("neogen.types.template").item
|
||||||
|
|
||||||
|
return {
|
||||||
|
{ nil, "# Public: $1", { type = { "func", "class" } } },
|
||||||
|
{ nil, "# Public: $1", { type = { "class", "func" }, no_results = true } },
|
||||||
|
{ i.Parameter, "# %s - $1", { before_first_item = { "#" } } },
|
||||||
|
{ i.Return, "# Returns $1", { before_first_item = { "#" } } },
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user