diff --git a/README.md b/README.md index a137801..6a5b035 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ There is a list of supported languages and fields, with their annotation style | | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `@param`, `@return`, `@brief`, `@file`| | cpp | | | `func`, `file`, `class`| | | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `@param`, `@return`, `@tparam`, `@brief`, `@file`, `@class`| -| go | | | | +| go | | | `func`, `type` | | | [Godoc](https://go.dev/blog/godoc) (`"godoc"`) | | | java | | | `func`, `class` | | | [Javadoc](https://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#documentationcomments) (`"javadoc"`) | `@param`, `@return`, `@throws`| diff --git a/lua/neogen/configurations/go.lua b/lua/neogen/configurations/go.lua index f4972a3..055f5e3 100644 --- a/lua/neogen/configurations/go.lua +++ b/lua/neogen/configurations/go.lua @@ -1,6 +1,7 @@ return { parent = { func = { "function_declaration" }, + type = { "package_clause", "const_declaration", "var_declaration" }, }, data = { @@ -13,6 +14,15 @@ return { }, }, }, + type = { + ["package_clause|const_declaration|var_declaration"] = { + ["0"] = { + extract = function() + return {} + end, + }, + }, + }, }, template = {