feat: add doxygen

pull/122/head
Colin Graydon 2025-04-21 09:49:38 -04:00
parent 1d712047de
commit 090ee58a0d
1 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,48 @@
return {
{
"danymat/neogen",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"L3MON4D3/LuaSnip", -- Explicitly add LuaSnip as a dependency
},
cmd = "Neogen",
opts = {
enabled = true,
snippet_engine = "luasnip",
languages = {
cpp = { template = { annotation_convention = "doxygen" } },
c = { template = { annotation_convention = "doxygen" } },
java = { template = { annotation_convention = "doxygen" } },
python = { template = { annotation_convention = "google_docstrings" } },
go = { template = { annotation_convention = "godoc" } },
typescript = { template = { annotation_convention = "jsdoc" } },
javascript = { template = { annotation_convention = "jsdoc" } }, -- Added JavaScript as well since it uses the same convention
},
},
keys = {
-- Create a keybinding to trigger Neogen
{
"<Leader>nd",
function()
require("neogen").generate()
end,
desc = "Generate Documentation",
},
-- Optional: Map specific types of documentation
{
"<Leader>nf",
function()
require("neogen").generate({ type = "func" })
end,
desc = "Document Function",
},
{
"<Leader>nc",
function()
require("neogen").generate({ type = "class" })
end,
desc = "Document Class",
},
},
},
}