Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Use your favorite package manager to install Neogen, e.g:
### Lazy

```lua
{
"danymat/neogen",
{
"danymat/neogen",
config = true,
-- Uncomment next line if you want to follow only stable versions
-- version = "*"
-- version = "*"
}
```

Expand Down Expand Up @@ -232,11 +232,12 @@ There is a list of supported languages and fields, with their annotation style
| c | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `func`, `file`, `type` |
| cs | [Xmldoc](https://docs.microsoft.com/fr-fr/dotnet/csharp/language-reference/xmldoc/) (`"xmldoc"`) <br> [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `func`, `file`, `class` |
| cpp | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `func`, `file`, `class` |
| cuda | [Doxygen](https://www.doxygen.nl/manual/commands.html) (`"doxygen"`) | `func`, `file`, `class` |
| go | [GoDoc](https://go.dev/blog/godoc) (`"godoc"`) | `func`, `type` |
| java | [Javadoc](https://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#documentationcomments) (`"javadoc`) | `func`, `class`, `type` |
| javascript | [JSDoc](https://jsdoc.app) (`"jsdoc"`) | `func`, `class`, `type`, `file` |
| javascriptreact | [JSDoc](https://jsdoc.app) (`"jsdoc"`) | `func`, `class`, `type`, `file` |
| julia | [Julia](https://docs.julialang.org/en/v1/manual/documentation/#Writing-Documentation) (`"julia"`) | `func`, `class` |
| julia | [Julia](https://docs.julialang.org/en/v1/manual/documentation/#Writing-Documentation) (`"julia"`) | `func`, `class` |
| kotlin | [KDoc](https://kotlinlang.org/docs/kotlin-doc.html) (`"kdoc"`) | `func`, `class` |
| lua | [Emmylua](https://emmylua.github.io/) (`"emmylua"`)<br> [Ldoc](https://stevedonovan.github.io/ldoc/manual/doc.md.html) (`"ldoc"`) | `func`, `class`, `type`, `file` |
| php | [Php-doc](https://docs.phpdoc.org/3.0/guide/references/phpdoc/index.html) (`"phpdoc"`) | `func`, `type`, `class` |
Expand All @@ -253,7 +254,7 @@ There is a list of supported languages and fields, with their annotation style
2. (advanced) Only if the defaults aren't enough, please see here: [Advanced Integration](./docs/advanced-integration.md)

Tip: Take a look at this beatiful diagram, showing a representation of the codebase. You can then take a first understanding of what is under the hood. For more details, you can see `:h neogen-develop`.

![Visualization of this repo](./diagram.svg)

## Tests
Expand Down
30 changes: 30 additions & 0 deletions lua/neogen/configurations/cuda.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local c_config = require("neogen.configurations.c")
local extractors = require("neogen.utilities.extractors")
local nodes_utils = require("neogen.utilities.nodes")
local i = require("neogen.types.template").item

local cuda_config = {
parent = {
class = { "class_specifier", "struct_specifier" },
},
data = {
class = {
["class_specifier|struct_specifier"] = {
["0"] = {
extract = function(node)
local tree = {
{ retrieve = "first", node_type = "type_identifier", extract = true, as = i.ClassName },
}
local nodes = nodes_utils:matching_nodes_from(node, tree)
local res = extractors:extract_from_matched(nodes)
return res
end,
},
},
},
},
}

cuda_config = vim.tbl_deep_extend("force", c_config, cuda_config)

return cuda_config