Add neogen for annotation generation

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:03 -05:00
parent 324b7bc012
commit 066f271e15
2 changed files with 19 additions and 0 deletions

View File

@ -45,6 +45,7 @@
"neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" },
"neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" },
"neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" }, "neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" },
"neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
"neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" }, "neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" },
"neotest-python": { "branch": "master", "commit": "c969a5b0073f2b5c8eaf017d1652f9251d761a15" }, "neotest-python": { "branch": "master", "commit": "c969a5b0073f2b5c8eaf017d1652f9251d761a15" },
"neotest-rust": { "branch": "main", "commit": "46428d9013023f516a61274a78b0cee87fb7e8bc" }, "neotest-rust": { "branch": "main", "commit": "46428d9013023f516a61274a78b0cee87fb7e8bc" },

18
lua/plugins/neogen.lua Normal file
View File

@ -0,0 +1,18 @@
return {
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
config = true,
-- Uncomment next line if you want to follow only stable versions
-- version = "*"
opts = {
snippet_engine = "luasnip",
},
keys = {
{ "<leader>nf", "<cmd>lua require('neogen').generate()<CR>", { desc = "Generate Neogen function annotation" } },
{
"<leader>nc",
"<cmd>lua require('neogen').generate({ type = 'class' })<CR>",
{ desc = "Generate Neogen class annotation" },
},
},
}