dotfiles/.config/nvim/lua/plugins/extras/annotation.lua
Sergio Laín c4e8fe2941
♻️ refactor(nvim): big changes to the config structure
a lot of plugins are moving to the extra modules
all the keymaps are on the keys section of each plugin
which-key options are now dependant on the plugin they are in, etc
2023-10-20 15:01:41 +02:00

55 lines
1.1 KiB
Lua

return {
{
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
opts = {
snippet_engine = "luasnip",
enabled = true,
},
keys = {
{
"<leader>ad",
function()
require("neogen").generate()
end,
desc = "Default Annotation",
},
{
"<leader>ac",
function()
require("neogen").generate({ type = "class" })
end,
desc = "Class",
},
{
"<leader>af",
function()
require("neogen").generate({ type = "func" })
end,
desc = "Function",
},
{
"<leader>at",
function()
require("neogen").generate({ type = "type" })
end,
desc = "Type",
},
{
"<leader>aF",
function()
require("neogen").generate({ type = "file" })
end,
desc = "File",
},
},
},
{
"folke/which-key.nvim",
opts = {
defaults = {
["<leader>a"] = { name = "+annotation" },
},
},
},
}