nvim/lua/custom/plugins/neogen.lua
Jeremie Fraeys 6c762c436a
Some checks failed
Luacheck / luacheck (push) Failing after 4s
StyLua / stylua (push) Failing after 2s
fix: endx typo in lsp-servers.lua
2026-02-08 15:08:04 -05:00

35 lines
833 B
Lua
Executable file

return {
'danymat/neogen',
dependencies = {
'nvim-treesitter/nvim-treesitter',
'L3MON4D3/LuaSnip',
},
keys = {
{
'<leader>nf',
function()
require('neogen').generate({ type = 'func' })
end,
desc = 'Generate function documentation',
},
{
'<leader>nt',
function()
require('neogen').generate({ type = 'type' })
end,
desc = 'Generate type documentation',
},
},
config = function()
require('neogen').setup({
enabled = true,
snippet_engine = 'luasnip', -- Using LuaSnip as the snippet engine
})
end,
cond = function()
-- Only load if Treesitter is installed and available
return vim.fn.exists(':TSInstall') == 2
end,
-- Uncomment next line if you want to follow only stable versions
-- version = "*"
}