diff --git a/after/plugin/comment.lua b/after/plugin/comment.lua deleted file mode 100644 index bd47faf..0000000 --- a/after/plugin/comment.lua +++ /dev/null @@ -1 +0,0 @@ -require("Comment").setup() diff --git a/after/plugin/neogen.lua b/after/plugin/neogen.lua deleted file mode 100644 index 3a3fa1d..0000000 --- a/after/plugin/neogen.lua +++ /dev/null @@ -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', 'nf', function() - neogen.generate({ type = 'func' }) -end) - -vim.keymap.set('n', 'nt', function() - neogen.generate({ type = 'type' }) -end) - -vim.keymap.set('n', 'nc', function() - neogen.generate({ type = 'class' }) -end) - -vim.keymap.set('i', '', function() - neogen.jump_next() -end) - -vim.keymap.set('i', '', function() - neogen.jump_prev() -end) diff --git a/lua/409/lazy.lua b/lua/409/lazy.lua index 94be71b..ca014cf 100644 --- a/lua/409/lazy.lua +++ b/lua/409/lazy.lua @@ -12,4 +12,9 @@ end vim.opt.rtp:prepend(lazypath) -require("lazy").setup("409.plugins") +local lazy = require("lazy") +lazy.setup("409.plugins", { + ui = { + border = "single" + } +}) diff --git a/lua/409/plugins/comments.lua b/lua/409/plugins/comments.lua index 6f2d50c..a438e16 100644 --- a/lua/409/plugins/comments.lua +++ b/lua/409/plugins/comments.lua @@ -1,11 +1,63 @@ return { - "numToStr/Comment.nvim", - { - "danymat/neogen", - dependencies = { "nvim-treesitter/nvim-treesitter" }, - }, { - "folke/todo-comments.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - }, + "numToStr/Comment.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 = { + { + "nf", + ":Neogen func", + desc = "Document function" + }, + { + "nt", + ":Neogen type", + desc = "Document type" + }, + { + "nc", + ":Neogen class", + desc = "Document class" + }, + { + "", + function() + require("neogen").jump_next() + end, + mode = "i", + desc = "Next documentation field" + }, + { + "", + function() + require("neogen").jump_prev() + end, + mode = "i", + desc = "Previous documentation field" + }, + } + }, + { + "folke/todo-comments.nvim", + event = "VeryLazy", + dependencies = { "nvim-lua/plenary.nvim" }, + }, } diff --git a/lua/409/plugins/util.lua b/lua/409/plugins/util.lua index 6ce86fd..2ea4d4e 100644 --- a/lua/409/plugins/util.lua +++ b/lua/409/plugins/util.lua @@ -3,11 +3,14 @@ return { "nvim-lua/plenary.nvim", lazy = true, }, - { - "christoomey/vim-tmux-navigator", - lazy = false, - }, - "mbbill/undotree", - "nvim-tree/nvim-web-devicons", - "RRethy/vim-illuminate", + { + "christoomey/vim-tmux-navigator", + lazy = false, + }, + "mbbill/undotree", + "nvim-tree/nvim-web-devicons", + { + "RRethy/vim-illuminate", + event = "VeryLazy" + }, }