(go) Add support for godoc
This commit is contained in:
@@ -169,6 +169,8 @@ There is a list of supported languages and fields, with their annotation style
|
|||||||
| | [JSDoc](https://jsdoc.app) (`"jsdoc"`) | `@param`, `@returns`, `@class`, `@classdesc` |
|
| | [JSDoc](https://jsdoc.app) (`"jsdoc"`) | `@param`, `@returns`, `@class`, `@classdesc` |
|
||||||
| c | | |
|
| c | | |
|
||||||
| | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `@param`, `@returns` |
|
| | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `@param`, `@returns` |
|
||||||
|
| go | | |
|
||||||
|
| | [Godoc](https://go.dev/blog/godoc) (`"godoc"`) | |
|
||||||
|
|
||||||
|
|
||||||
## Adding Languages
|
## Adding Languages
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ neogen.setup = function(opts)
|
|||||||
python = require("neogen.configurations.python"),
|
python = require("neogen.configurations.python"),
|
||||||
javascript = require("neogen.configurations.javascript"),
|
javascript = require("neogen.configurations.javascript"),
|
||||||
c = require("neogen.configurations.c"),
|
c = require("neogen.configurations.c"),
|
||||||
|
go = require("neogen.configurations.go"),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
24
lua/neogen/configurations/go.lua
Normal file
24
lua/neogen/configurations/go.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
parent = {
|
||||||
|
func = { "function_declaration" },
|
||||||
|
},
|
||||||
|
|
||||||
|
data = {
|
||||||
|
func = {
|
||||||
|
["function_declaration"] = {
|
||||||
|
["0"] = {
|
||||||
|
extract = function()
|
||||||
|
return {}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
template = {
|
||||||
|
annotation_convention = "godoc",
|
||||||
|
godoc = {
|
||||||
|
{ nil, " $1", { no_results = true } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user