From b83379924ecfd3aee15592ad2c8c5ae87a50a409 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Mon, 27 Nov 2023 14:21:13 -0500 Subject: [PATCH] Add neogen for annotation generation --- lazy-lock.json | 1 + lua/plugins/neogen.lua | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 lua/plugins/neogen.lua diff --git a/lazy-lock.json b/lazy-lock.json index 7008c83..1522300 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -45,6 +45,7 @@ "neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, "neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" }, + "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" }, "neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" }, "neotest-python": { "branch": "master", "commit": "c969a5b0073f2b5c8eaf017d1652f9251d761a15" }, "neotest-rust": { "branch": "main", "commit": "46428d9013023f516a61274a78b0cee87fb7e8bc" }, diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua new file mode 100644 index 0000000..579c81b --- /dev/null +++ b/lua/plugins/neogen.lua @@ -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 = { + { "nf", "lua require('neogen').generate()", { desc = "Generate Neogen function annotation" } }, + { + "nc", + "lua require('neogen').generate({ type = 'class' })", + { desc = "Generate Neogen class annotation" }, + }, + }, +}