nvim/lua/custom/plugins/neogen.lua
Jeremie Fraeys 02e26b00b7
Some checks are pending
Check Lua Formatting in MyRepo / Stylua Check (push) Waiting to run
chore(nvim): reinitialize with working config
2026-02-07 21:06:45 -05:00

36 lines
834 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 = "*"
}