nvim: add plugin 'danymat/neogen'
This commit is contained in:
parent
f6e6a319a5
commit
62d28c5aa0
4 changed files with 41 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
||||||
|
"neogen": { "branch": "main", "commit": "4a2f68d3eae0018b04132f1d4590e51484043354" },
|
||||||
"neogit": { "branch": "master", "commit": "536b4cfc009fc6d8bd771f010f04d48204533fae" },
|
"neogit": { "branch": "master", "commit": "536b4cfc009fc6d8bd771f010f04d48204533fae" },
|
||||||
"nerdy.nvim": { "branch": "main", "commit": "7c9a4ea4a9ca7063e86dbcf7ce0f233cb59bdc10" },
|
"nerdy.nvim": { "branch": "main", "commit": "7c9a4ea4a9ca7063e86dbcf7ce0f233cb59bdc10" },
|
||||||
"nginx.vim": { "branch": "master", "commit": "cffaec54f0c7f9518de053634413a20e90eac825" },
|
"nginx.vim": { "branch": "master", "commit": "cffaec54f0c7f9518de053634413a20e90eac825" },
|
||||||
|
|
|
@ -30,7 +30,7 @@ local lsp_on_attach = function(--[[client]]_, buffer)
|
||||||
map("n", "grr", vim.lsp.buf.rename, opts)
|
map("n", "grr", vim.lsp.buf.rename, opts)
|
||||||
map("n", "gt", vim.lsp.buf.type_definition, opts)
|
map("n", "gt", vim.lsp.buf.type_definition, opts)
|
||||||
map("n", "K", vim.lsp.buf.hover, opts)
|
map("n", "K", vim.lsp.buf.hover, opts)
|
||||||
map("i", "<c-l>", vim.lsp.buf.signature_help, opts)
|
map("i", "<c-,>", vim.lsp.buf.signature_help, opts)
|
||||||
-- stylua: ignore end
|
-- stylua: ignore end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
38
config/nvim/lua/fschauen/plugins/neogen.lua
Normal file
38
config/nvim/lua/fschauen/plugins/neogen.lua
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
return {
|
||||||
|
"danymat/neogen",
|
||||||
|
|
||||||
|
keys = function()
|
||||||
|
local icon = require("fschauen.util.icons").ui.Annotation
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"<leader>aa",
|
||||||
|
function() require("neogen").generate() end,
|
||||||
|
desc = icon .. " generate [a]nnotation [a]utomatically",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ac",
|
||||||
|
function() require("neogen").generate { type = "class" } end,
|
||||||
|
desc = icon .. " generate [a]nnotation for [c]lass",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>af",
|
||||||
|
function() require("neogen").generate { type = "func" } end,
|
||||||
|
desc = icon .. " generate [a]nnotation for [f]unction",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-l>",
|
||||||
|
function() require("neogen").jump_next() end,
|
||||||
|
mode = "i",
|
||||||
|
desc = icon .. " next annotation placeholder",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-h>",
|
||||||
|
function() require("neogen").jump_prev() end,
|
||||||
|
mode = "i",
|
||||||
|
desc = icon .. " previous annotation placeholder",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
|
||||||
|
config = true,
|
||||||
|
}
|
|
@ -73,6 +73,7 @@ M.kind = {
|
||||||
}
|
}
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
|
Annotation = "",
|
||||||
Attention = "",
|
Attention = "",
|
||||||
Bug = "", --
|
Bug = "", --
|
||||||
Checkbox = "", --
|
Checkbox = "", --
|
||||||
|
|
Loading…
Add table
Reference in a new issue