migrated neogen and comment to the lazy plugins directory

This commit is contained in:
2024-04-09 06:07:26 +02:00
parent 617f183b91
commit ce68ad5dfc
5 changed files with 76 additions and 50 deletions

View File

@@ -1 +0,0 @@
require("Comment").setup()

View File

@@ -1,33 +0,0 @@
local neogen = require('neogen')
neogen.setup({
enabled = true, --if you want to disable Neogen
input_after_comment = true, -- (default: true) automatic jump (with insert mode) on inserted annotation
languages = {
cs = {
template = {
annotation_convention = 'xmldoc'
}
}
}
})
vim.keymap.set('n', '<leader>nf', function()
neogen.generate({ type = 'func' })
end)
vim.keymap.set('n', '<leader>nt', function()
neogen.generate({ type = 'type' })
end)
vim.keymap.set('n', '<leader>nc', function()
neogen.generate({ type = 'class' })
end)
vim.keymap.set('i', '<C-k>', function()
neogen.jump_next()
end)
vim.keymap.set('i', '<C-j>', function()
neogen.jump_prev()
end)

View File

@@ -12,4 +12,9 @@ end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup("409.plugins") local lazy = require("lazy")
lazy.setup("409.plugins", {
ui = {
border = "single"
}
})

View File

@@ -1,11 +1,63 @@
return { return {
"numToStr/Comment.nvim",
{
"danymat/neogen",
dependencies = { "nvim-treesitter/nvim-treesitter" },
},
{ {
"folke/todo-comments.nvim", "numToStr/Comment.nvim",
dependencies = { "nvim-lua/plenary.nvim" }, event = "VeryLazy",
}, config = function()
require("Comment").setup()
end
},
{
"danymat/neogen",
event = "VeryLazy",
dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {
enabled = true,
input_after_comment = true,
languages = {
cs = {
template = {
annotation_convention = "xmldoc"
}
}
}
},
keys = {
{
"<leader>nf",
":Neogen func<CR>",
desc = "Document function"
},
{
"<leader>nt",
":Neogen type<CR>",
desc = "Document type"
},
{
"<leader>nc",
":Neogen class<CR>",
desc = "Document class"
},
{
"<C-k>",
function()
require("neogen").jump_next()
end,
mode = "i",
desc = "Next documentation field"
},
{
"<C-j>",
function()
require("neogen").jump_prev()
end,
mode = "i",
desc = "Previous documentation field"
},
}
},
{
"folke/todo-comments.nvim",
event = "VeryLazy",
dependencies = { "nvim-lua/plenary.nvim" },
},
} }

View File

@@ -3,11 +3,14 @@ return {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
lazy = true, lazy = true,
}, },
{ {
"christoomey/vim-tmux-navigator", "christoomey/vim-tmux-navigator",
lazy = false, lazy = false,
}, },
"mbbill/undotree", "mbbill/undotree",
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"RRethy/vim-illuminate", {
"RRethy/vim-illuminate",
event = "VeryLazy"
},
} }