feat(rb) Add support for tomdoc
This commit is contained in:
@@ -7,7 +7,7 @@ local template = {}
|
||||
|
||||
template.parent = {
|
||||
func = { "method" },
|
||||
class = { "class" },
|
||||
class = { "class", "module" },
|
||||
type = { "call" },
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ template.data = {
|
||||
},
|
||||
},
|
||||
class = {
|
||||
["class"] = {
|
||||
["class|module"] = {
|
||||
["0"] = {
|
||||
extract = function()
|
||||
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
|
||||
|
||||
@@ -216,6 +216,8 @@ end
|
||||
---
|
||||
--- 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~
|
||||
--- - Improve godoc template (#75)
|
||||
--- ## 2.3.0~
|
||||
@@ -236,7 +238,7 @@ end
|
||||
--- with multiple annotation conventions.
|
||||
---@tag neogen-changelog
|
||||
---@toc_entry Changes in neogen plugin
|
||||
neogen.version = "2.4.0"
|
||||
neogen.version = "2.5.0"
|
||||
--minidoc_afterlines_end
|
||||
|
||||
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